Three-Phase Fault Parameter Values of Simulink Model in Real-Time Target

5 Ansichten (letzte 30 Tage)
Hello, I am using a SimPowerSystems part called Three-Phase Fault in a Simulink model which I am running on a Real-Time target.
I wish to change the value of a parameter of the Three-Phase Fault block, the Fault resistance value, between runs without recompiling the model on the target.
When I examine the Real-Time Target object to see the parameter list, I can't see this parameter to modify and looking at the block with the Mask Editor, the parameter attribute is not ticked as tunable.
How can I make this parameter adjustable using setparam like many of its other variables?
Do I have to create a custom version of this part by breaking its reference to the original library part or is there another method which will work, like setting a global variable that the target will examine before each run.
Thank you in advance for your suggestions.

Akzeptierte Antwort

McSpark
McSpark am 30 Sep. 2014
Bearbeitet: McSpark am 30 Sep. 2014
Hi everyone,
I worked out how to do this. I created a block where I used the SimPowerSystems parts Variable Resistor, Solver Configuration, Single Phase Switch, Current-Voltage Simscape Interface, Electrical Reference and two Simulink->PS Converter Blocks to achieve this functionality.
The Resistance comes via a constant into a port and is converted from Simulink signal to a physical signal via the Simulink->PS block and adjusts the value of the variable resistor on the +ssc and -ssc side of the current to voltage simscape interface block. On the simscape side there is a single phase switch which has its control signal passed the same way as the resistance.
This can be then used to change the value of the fault resistance on the target using the setparam command without recompiling the real time target model.

Weitere Antworten (1)

Suneesh
Suneesh am 26 Sep. 2014
This is more of a question about the Three-Phase fault block rather than about Simulink Real-Time. The parameter does not appear in the set of tun-able parameters for the target object becasue the block designer decided that the parameter should not be tun-able(and hence did not check the box for 'Tunable' in the mask parameter).
Any kind of customization MIGHT break the blocks functionality since it seems like the block designers decided NOT to make the parameter tunable. Going through MathWorks Tech Support may yield a solution or workaround.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by