日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Modelica示例——比较器电路

發布時間:2024/3/13 编程问答 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Modelica示例——比较器电路 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

簡介

運算放大器經常用作非線性器件來比較兩個電壓的幅值,在這種應用中,運算放大器用作開環配置,輸入的一端(同相端+)是輸入電壓,輸入的另一端(反相端-)是參考電壓。輸出端的電壓在運放工作飽和電壓值之間變化。

過零檢測器

過零檢測器的參考電壓是0V電壓,可以用“地”表示。

-電路

-仿真曲線

-程序

model ca Modelica.Electrical.Analog.Basic.Ground ground1 annotation( Placement(visible = true, transformation(origin = {0, -14}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Sources.SineVoltage sineVoltage1(V = 5, freqHz = 10, offset = 0, phase = 0, startTime = 0) annotation( Placement(visible = true, transformation(origin = {0, -36}, extent = {{10, -10}, {-10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Sources.ConstantVoltage constantVoltage1(V = 15) annotation( Placement(visible = true, transformation(origin = {52, 22}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Basic.Ground ground2 annotation( Placement(visible = true, transformation(origin = {82, 12}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Sources.ConstantVoltage constantVoltage2(V = -15) annotation( Placement(visible = true, transformation(origin = {52, -32}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Basic.Ground ground3 annotation( Placement(visible = true, transformation(origin = {82, -42}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Ideal.IdealizedOpAmpLimted idealizedOpAmpLimted1 annotation( Placement(visible = true, transformation(origin = {42, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Basic.Ground ground4 annotation( Placement(visible = true, transformation(origin = {-22, -52}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); equation connect(idealizedOpAmpLimted1.in_n, ground1.p) annotation( Line(points = {{32, -4}, {0, -4}}, color = {0, 0, 255})); connect(sineVoltage1.n, ground4.p) annotation( Line(points = {{-10, -36}, {-22, -36}, {-22, -42}}, color = {0, 0, 255})); connect(sineVoltage1.p, idealizedOpAmpLimted1.in_p) annotation( Line(points = {{10, -36}, {21, -36}, {21, -16}, {32, -16}}, color = {0, 0, 255})); connect(idealizedOpAmpLimted1.s_p, constantVoltage1.p) annotation( Line(points = {{42, 0}, {42, 0}, {42, 22}, {42, 22}}, color = {0, 0, 255})); connect(idealizedOpAmpLimted1.s_n, constantVoltage2.p) annotation( Line(points = {{42, -20}, {42, -20}, {42, -32}, {42, -32}}, color = {0, 0, 255})); connect(constantVoltage2.n, ground3.p) annotation( Line(points = {{62, -32}, {82, -32}, {82, -32}, {82, -32}}, color = {0, 0, 255})); connect(constantVoltage1.n, ground2.p) annotation( Line(points = {{62, 22}, {82, 22}, {82, 22}, {82, 22}}, color = {0, 0, 255})); annotation( uses(Modelica(version = "3.2.2")), experiment(StartTime = 0, StopTime = 1, Tolerance = 1e-06, Interval = 0.0002)); end ca;

非過零檢測器

如果反相端輸入不是零電壓,而是一個其他的常值電壓,則形成非過零檢測器。

-電路

-仿真曲線

-程序

model ca Modelica.Electrical.Analog.Basic.Ground ground1 annotation( Placement(visible = true, transformation(origin = {-22, -14}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Sources.SineVoltage sineVoltage1(V = 5, freqHz = 10, offset = 0, phase = 0, startTime = 0) annotation( Placement(visible = true, transformation(origin = {0, -36}, extent = {{10, -10}, {-10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Sources.ConstantVoltage constantVoltage1(V = 15) annotation( Placement(visible = true, transformation(origin = {52, 22}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Basic.Ground ground2 annotation( Placement(visible = true, transformation(origin = {82, 12}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Sources.ConstantVoltage constantVoltage2(V = -15) annotation( Placement(visible = true, transformation(origin = {52, -32}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Basic.Ground ground3 annotation( Placement(visible = true, transformation(origin = {82, -42}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Ideal.IdealizedOpAmpLimted idealizedOpAmpLimted1 annotation( Placement(visible = true, transformation(origin = {42, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Basic.Ground ground4 annotation( Placement(visible = true, transformation(origin = {-22, -52}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Sources.ConstantVoltage constantVoltage3(V = 2) annotation( Placement(visible = true, transformation(origin = {6, -4}, extent = {{10, -10}, {-10, 10}}, rotation = 0))); equation connect(constantVoltage3.n, ground1.p) annotation( Line(points = {{-4, -4}, {-22, -4}, {-22, -4}, {-22, -4}}, color = {0, 0, 255})); connect(constantVoltage3.p, idealizedOpAmpLimted1.in_n) annotation( Line(points = {{16, -4}, {32, -4}, {32, -4}, {32, -4}}, color = {0, 0, 255})); connect(sineVoltage1.n, ground4.p) annotation( Line(points = {{-10, -36}, {-22, -36}, {-22, -42}}, color = {0, 0, 255})); connect(sineVoltage1.p, idealizedOpAmpLimted1.in_p) annotation( Line(points = {{10, -36}, {21, -36}, {21, -16}, {32, -16}}, color = {0, 0, 255})); connect(idealizedOpAmpLimted1.s_p, constantVoltage1.p) annotation( Line(points = {{42, 0}, {42, 0}, {42, 22}, {42, 22}}, color = {0, 0, 255})); connect(idealizedOpAmpLimted1.s_n, constantVoltage2.p) annotation( Line(points = {{42, -20}, {42, -20}, {42, -32}, {42, -32}}, color = {0, 0, 255})); connect(constantVoltage2.n, ground3.p) annotation( Line(points = {{62, -32}, {82, -32}, {82, -32}, {82, -32}}, color = {0, 0, 255})); connect(constantVoltage1.n, ground2.p) annotation( Line(points = {{62, 22}, {82, 22}, {82, 22}, {82, 22}}, color = {0, 0, 255})); annotation( uses(Modelica(version = "3.2.2")), experiment(StartTime = 0, StopTime = 1, Tolerance = 1e-06, Interval = 0.0002));

end ca;

窗口比較器

如果將兩個非零值比較器組合,可形成窗口比較器。只要輸入Uin在窗口之內,則每個比較器的輸入都為其低飽和電平,此時兩個二極管都反相偏置,并且通過電阻接地。輸出電壓為0。當輸入Uin在窗口之外,則某個比較器的輸入為其高飽和電平,一個為低飽和電平,低飽和電平導致此路二極管反偏。

-電路

-曲線

-程序

model ca Modelica.Electrical.Analog.Basic.Ground ground1 annotation( Placement(visible = true, transformation(origin = {-64, 22}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Sources.SineVoltage sineVoltage1(V = 12, freqHz = 4, offset = 0, phase = 0, startTime = 0) annotation( Placement(visible = true, transformation(origin = {-42, 0}, extent = {{10, -10}, {-10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Sources.ConstantVoltage constantVoltage1(V = 15) annotation( Placement(visible = true, transformation(origin = {10, 58}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Basic.Ground ground2 annotation( Placement(visible = true, transformation(origin = {40, 48}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Sources.ConstantVoltage constantVoltage2(V = -15) annotation( Placement(visible = true, transformation(origin = {10, 4}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Basic.Ground ground3 annotation( Placement(visible = true, transformation(origin = {40, -6}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Ideal.IdealizedOpAmpLimted idealizedOpAmpLimted1 annotation( Placement(visible = true, transformation(origin = {0, 26}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Basic.Ground ground4 annotation( Placement(visible = true, transformation(origin = {-64, -16}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Sources.ConstantVoltage constantVoltage3(V = 6) annotation( Placement(visible = true, transformation(origin = {-36, 32}, extent = {{10, -10}, {-10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Ideal.IdealizedOpAmpLimted idealizedOpAmpLimted2 annotation( Placement(visible = true, transformation(origin = {0, -40}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Sources.ConstantVoltage constantVoltage4(V = 15) annotation( Placement(visible = true, transformation(origin = {10, -14}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Basic.Ground ground5 annotation( Placement(visible = true, transformation(origin = {42, -74}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Sources.ConstantVoltage constantVoltage5(V = -15) annotation( Placement(visible = true, transformation(origin = {10, -64}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Sources.ConstantVoltage constantVoltage6(V = -4) annotation( Placement(visible = true, transformation(origin = {-34, -46}, extent = {{10, -10}, {-10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Basic.Ground ground6 annotation( Placement(visible = true, transformation(origin = {-64, -56}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Ideal.IdealDiode idealDiode1 annotation( Placement(visible = true, transformation(origin = {28, 26}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Ideal.IdealDiode idealDiode2 annotation( Placement(visible = true, transformation(origin = {30, -40}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Electrical.Analog.Basic.Resistor resistor1(R = 1000) annotation( Placement(visible = true, transformation(origin = {64, -54}, extent = {{-10, -10}, {10, 10}}, rotation = -90))); Modelica.Electrical.Analog.Interfaces.Pin pin annotation( Placement(visible = true, transformation(origin = {77, -9}, extent = {{-3, -3}, {3, 3}}, rotation = 0), iconTransformation(origin = {77, -9}, extent = {{-3, -3}, {3, 3}}, rotation = 0))); Modelica.Electrical.Analog.Basic.Ground ground7 annotation( Placement(visible = true, transformation(origin = {40, -24}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); equation connect(idealDiode1.p, idealizedOpAmpLimted1.out) annotation( Line(points = {{18, 26}, {10, 26}, {10, 26}, {10, 26}}, color = {0, 0, 255})); connect(ground2.p, constantVoltage1.n) annotation( Line(points = {{40, 58}, {20, 58}, {20, 58}, {20, 58}}, color = {0, 0, 255})); connect(idealizedOpAmpLimted1.in_n, constantVoltage3.p) annotation( Line(points = {{-10, 32}, {-26, 32}, {-26, 32}, {-26, 32}}, color = {0, 0, 255})); connect(idealDiode2.p, idealizedOpAmpLimted2.out) annotation( Line(points = {{20, -40}, {10, -40}, {10, -40}, {10, -40}}, color = {0, 0, 255})); connect(idealizedOpAmpLimted2.in_p, constantVoltage6.p) annotation( Line(points = {{-10, -46}, {-24, -46}, {-24, -46}, {-24, -46}}, color = {0, 0, 255})); connect(resistor1.p, pin) annotation( Line(points = {{64, -44}, {64, -44}, {64, -10}, {78, -10}, {78, -8}}, color = {0, 0, 255})); connect(idealDiode1.n, pin) annotation( Line(points = {{38, 26}, {64, 26}, {64, -10}, {78, -10}, {78, -8}, {78, -8}}, color = {0, 0, 255})); connect(constantVoltage4.n, ground7.p) annotation( Line(points = {{20, -14}, {40, -14}, {40, -14}, {40, -14}}, color = {0, 0, 255})); connect(constantVoltage2.n, ground3.p) annotation( Line(points = {{20, 4}, {30, 4}, {30, 6}, {40, 6}}, color = {0, 0, 255})); connect(idealizedOpAmpLimted1.s_p, constantVoltage1.p) annotation( Line(points = {{0, 36}, {0, 36}, {0, 58}, {0, 58}}, color = {0, 0, 255})); connect(constantVoltage3.n, ground1.p) annotation( Line(points = {{-46, 32}, {-64, 32}, {-64, 32}, {-64, 32}}, color = {0, 0, 255})); connect(sineVoltage1.n, ground4.p) annotation( Line(points = {{-52, 0}, {-64, 0}, {-64, -6}}, color = {0, 0, 255})); connect(constantVoltage6.n, ground6.p) annotation( Line(points = {{-44, -46}, {-64, -46}, {-64, -46}, {-64, -46}}, color = {0, 0, 255})); connect(idealizedOpAmpLimted1.in_p, sineVoltage1.p) annotation( Line(points = {{-10, 20}, {-10, 20}, {-10, 0}, {-32, 0}, {-32, 0}}, color = {0, 0, 255})); connect(idealizedOpAmpLimted2.in_n, sineVoltage1.p) annotation( Line(points = {{-10, -34}, {-10, 0}, {-32, 0}}, color = {0, 0, 255})); connect(idealizedOpAmpLimted1.s_n, constantVoltage2.p) annotation( Line(points = {{0, 14}, {0, 14}, {0, 2}, {0, 2}}, color = {0, 0, 255})); connect(idealDiode2.n, pin) annotation( Line(points = {{40, -40}, {64, -40}, {64, -10}, {78, -10}, {78, -10}, {78, -10}}, color = {0, 0, 255})); connect(constantVoltage4.p, idealizedOpAmpLimted2.s_p) annotation( Line(points = {{0, -16}, {0, -16}, {0, -32}, {0, -32}}, color = {0, 0, 255})); connect(idealizedOpAmpLimted2.s_n, constantVoltage5.p) annotation( Line(points = {{0, -52}, {0, -52}, {0, -66}, {0, -66}}, color = {0, 0, 255})); connect(constantVoltage5.n, ground5.p) annotation( Line(points = {{20, -64}, {42, -64}, {42, -64}, {42, -64}}, color = {0, 0, 255})); connect(resistor1.n, ground5.p) annotation( Line(points = {{64, -64}, {42, -64}, {42, -64}, {42, -64}}, color = {0, 0, 255})); annotation( uses(Modelica(version = "3.2.2")), experiment(StartTime = 0, StopTime = 1, Tolerance = 1e-06, Interval = 0.0002)); end ca;

總結

以上是生活随笔為你收集整理的Modelica示例——比较器电路的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。