Simple examples for validation of library's components
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Name | Description |
---|---|
![]() |
Ideal current bidirectional switch validation |
![]() |
Model to validate MPPT controller |
![]() |
Validation of the Park transformations |
![]() |
PLL validation example |
![]() |
Model to validate PVArray |
![]() |
Simple model to validate SignalPWM behaviour |
![]() |
Validation of SimpleBattery |
Ideal current bidirectional switch validation
IdealCBSwitchValidation presents a simple circuit to validate the behaviour of the corresponding component. The circuit is composed of a resistor in series with a sinusoidal AC voltage source and the ideal current bidirectional switch. The switch is operated by a step block that changes from 0 to 1 in the middle of the simulation. This changes the state of the switch from open to closed.
To use the example, simulate the model as provided and plot the source voltage as well as the switch voltage, the plot should look like this:
Notice how at the begining of the simulation, when the switch is not closed, it blocks all the positive voltage, preventing current from flowing. On the other hand, the negative voltage is not blocked, so the current can flow (through the parallel diode). When the switch is closed using the firing signal, it never blocks voltage, allowing bidirectional flow of current.
Plot the voltage drop in the result to confirm these results or play with the parameter values to see what effects they have.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Model to validate MPPT controller
This examples places the MPPT controller closing the loop for a voltage source connected to a PV array. The MPPT controller senses the power coming out of the PV array and provides a setpoint for the voltage source. This changes the operation point of the PV array with the goal of maximizing its output power for any given solar irradiation and junction temperature conditions.
The model is designed to challenge the control by ramping solar irradiation, temperature at different times and by injecting a perturbation into the control loop. The MPPT controller successfully deals with these changing conditions as shown in the following plot:
Extends from Modelica.Icons.Example (Icon for runnable examples).
Validation of the Park transformations
This example provides some easy input for the Park transform blocks to check that calculations are being done as expected. Run the simulation and you should get something like the following figure:
As expected, d is equal to the peak amplitude of the input signal and q sets at zero. Feeding the signals back to the inverse transformation block recreates the original signals.
Extends from Modelica.Icons.Example (Icon for runnable examples).
PLL validation example
This simple example provides a sinusoidal input to the PLL block and applies the output provided by the PLL, the calculated phase of the input sine, to drive a sine block so that the synchronization capabilities of the PLL can be visualized.
Run the model and plot the output of the sinusoidal source and the output of the sine block to see how, after some short transient, the PLL successfully follows the reference:
Extends from Modelica.Icons.Example (Icon for runnable examples).
Model to validate PVArray
PVArrayValidation presents a ramp DC voltage source in parallel with an instance of the PVArray model. The voltage ramp is configured to sweep from -10 volts to 35 volts in 1 second. This provides the enough voltage range to cover all of the PV array's working range when initialized with default values.
To use the example, simulate the model and start by displaying both voltage and current of the ramp voltage source. A figure like the following should be displayed:
Notice how the variation in the current delivered by the PV array (sinked by the voltage source) reflects the familiar PV module curve.
Modify the values for the irradiance and temperature blocks and see how these changes are reflected in a change in the PV curve, accurately reflecting the effects of these variables in the PV module performance.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Simple model to validate SignalPWM behaviour
SignalPWMValidation presents a very simple model aimed at validating the behaviour of the SignalPWM block. It provides a changing duty cycle with the use of two step blocks. When running the simulation with the provided values, plotting the fire output generates the following graph:
Through inspection of the plot, it can be seen how the signal constitutes a PWM signal with a duty cycle changing in steps through the values 0.2, 0.5 and 0.8. Zoom into the signal to confirm this fact as well as the value of the period, set at 10 milliseconds.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Validation of SimpleBattery
Extends from Modelica.Icons.Example (Icon for runnable examples).