Error in Activate (Modelica Block)
Hi All!
I am using the Power Converter block DCAC (Multiphase Inverter).
I am getting the below error while running the simulation:
"
[ThreePhaseInvertre]: Error: Error, (in MapleSim:-Modelica:-Flatten) in `vss_ThreePhaseInvertre_im.container.subcontainer` connecting scalar to array in connect(BooleanPulse.y,inverter.fire_p)
( 99 )
Block(s): connecting scalar to array in connect(BooleanPulse
Model: ThreePhaseInvertre
"
As far as I understand, I am not able to connect the Gating signals at inverter, neither using the singal boolean signal or using MUX to give pulses.
Can anyone guide me how to give pulses to this inverter block.
Thanks,
Sangeet
Answers
-
Hi Sangeet,
You just have to set type Vector and size 3 in ToModelica. The inputs are expected as vectors of size m, basically 3.
0 -
Thanks, the way you suggested worked.
I would also like to know how can I saperate the 3-phase AC signals generated, to connect to a load or voltage sensors.
Thanks
0 -
If you use the multiphase sensor you get the 3 phases in one vector signal
If you want to handle the phases separately, the demo Modelica/Electrical/QuasiStationary/MultiPhase/Unsymmetrical load.scm in demo browser shows how this can be realized.
0 -
Hi Sangeet,
on top of what Ronald has shown in the previous posts, you can also get inspiration from the demo/Modelica diagrams content.
As an example, the Modelica/Blocks/PID_Controller.scm demo illustrates how to take advantage of a ModelicaExtras/Routing/VectorScalar block that can do the job in this case.
The same goes for the output signal selection.
Please do not hesitate to ask for more example references if you feel it can speed up the learning/development process.
Best,
Filippo.
0 -
Hi Filippo!
Thanks for the valuable suggestion.
I want to use the python block to implement a functionality. For trial I have created a simple function, using if-else in the python code.
The name which I am giving to the ports are showing as undefined in the error.
Could you please help me out how this python block works?
Thanks,
Sangeet
0 -
HI Sangeet,
I presume you have to define the 'x' and 'y' I/O variables in your python snippet. Can you please check they both are defined?
Best,
Filippo.
0 -
You asking about the Function code?
0 -
Yes Sangeet, exactly. The 'x' variable needs to be defined before being used.
More precisely to avoid this:
you can, for example, get the x variable catching the input (e.g. with 'x = int(input())') or be assigned a certain value/reference (e.g. 5).
Best,
Filippo.
0