1 | model TestDiscreteBlocks
|
---|
2 | Modelica.Blocks.Discrete.Sampler sampler(samplePeriod = 0.025) annotation(
|
---|
3 | Placement(visible = true, transformation(origin = {-10, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
|
---|
4 | Modelica.Blocks.Discrete.TransferFunction transferFunction(a = {1, 0.9}, b = {1}, samplePeriod = 0.025) annotation(
|
---|
5 | Placement(visible = true, transformation(origin = {30, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
|
---|
6 | Modelica.Blocks.Sources.Sine sine(freqHz = 1) annotation(
|
---|
7 | Placement(visible = true, transformation(origin = {-50, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
|
---|
8 | equation
|
---|
9 | connect(sine.y, sampler.u) annotation(
|
---|
10 | Line(points = {{-39, -10}, {-22, -10}}, color = {0, 0, 127}));
|
---|
11 | connect(sampler.y, transferFunction.u) annotation(
|
---|
12 | Line(points = {{1, -10}, {18, -10}}, color = {0, 0, 127}));
|
---|
13 |
|
---|
14 | annotation(
|
---|
15 | uses(Modelica(version = "3.2.3")));
|
---|
16 | end TestDiscreteBlocks;
|
---|