Opened 18 years ago
Closed 12 years ago
#93 closed defect (fixed)
model produces unexpected results...
Reported by: | dohmp | Owned by: | dohmp |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Backend | Version: | |
Keywords: | Cc: | dohmp, Adrian Pop |
Description
Change History (3)
comment:1 by , 18 years ago
comment:2 by , 18 years ago
Added graphical annotations and verified that bug still exists:
model diodeTest
Modelica.Electrical.Analog.Ideal.IdealDiode d1
annotation(Placement(visible=true,transformation(x=-37.5,y=52.5,scale=0.075)));
Modelica.Electrical.Analog.Basic.Ground g
annotation(Placement(visible=true,transformation(x=-30,y=-10.8667,scale=0.075)));
Modelica.Electrical.Analog.Sources.SineVoltage
vs1(V=10.0,freqHz=60,offset=0,phase=0,startTime=0)
annotation(Placement(visible=true,transformation(x=-39.9521,y=16.65,scale=0.075,rotation=270)));
Modelica.Electrical.Analog.Sources.ConstantVoltage vs2(V=4.0)
annotation(Placement(visible=true,transformation(x=-60,y=27.1812,scale=0.075,rotation=270)));
Modelica.Electrical.Analog.Sources.ConstantVoltage vs3(V=0.6)
annotation(Placement(visible=true,transformation(x=-12.4354,y=52.5,scale=0.075,rotation=1080)));
Modelica.Electrical.Analog.Basic.Resistor r1(R=10)
annotation(Placement(visible=true,transformation(x=-13.1479,y=32.5249,scale=0.075)));
Modelica.Electrical.Analog.Basic.Resistor r2(R=10)
annotation(Placement(visible=true,transformation(x=5.9125,y=15,scale=0.075,rotation=270)));
equation
connect(vs3.n,r1.n)
annotation(Line(visible=true,points={{-5.02708,52.6333},{5.82083,52.6333},{5.82083,32.525},{-5.82083,32.525}}));
connect(r2.n,g.p)
annotation(Line(visible=true,points={{5.83958,7.52187},{5.83958,-3.32604},{-30.0115,-3.32604}}));
annotation(Line(visible=true,points={{-5.66979,32.525},{5.83958,32.525},{5.83958,22.4708}}));
connect(vs1.p,r1.p)
annotation(Line(visible=true,points={{-39.9521,24.0583},{-39.9521,32.525},{-20.6375,32.525}}));
connect(vs3.p,d1.n)
annotation(Line(visible=true,points={{-20.1083,52.6333},{-30.1625,52.6333}}));
connect(d1.p,vs2.p)
annotation(Line(visible=true,points={{-44.9792,52.6333},{-60.0604,52.6333},{-60.0604,34.6417}}));
connect(vs2.n,g.p)
annotation(Line(visible=true,points={{-60.0604,19.825},{-60,-3.45833},{-30.1625,-3.45833}}));
connect(vs1.n,g.p)
annotation(Line(visible=true,points={{-39.9521,9.24167},{-39.9521,-3.45833},{-30.1625,-3.45833}}));
end diodeTest;
comment:3 by , 12 years ago
Component: | → Backend |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
I checked the Model with Modelica 3.1 and compared it with dymola. There are no diverences.
the following model and commands produce unexpected results using the shell:
clear()
cd("c:\temp")
loadModel(Modelica)
model diodeTest
vs1(V=10.0,phase=0,freqHz=60,offset=0,startTime=0);
equation
end diodeTest;
simulate(diodeTest,startTime=0,stopTime=0.025,numberOfIntervals=1000)
plot(r2.p.v)
the plot suggests that the ideal diode model is not actually setting the current
to zero on negative bias of the diode, even though all documentation and model
code suggests it should.
am i just an idiot, and somehow designed the circuit incorrectly? working it by
hand definitely produces a very different result.