MATLAB Answers

How can I create a variable resistor for use in SimPowerSystems?

195 views (last 30 days)
I would like to model a variable resistor for use in SimPowerSystems.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 18 Oct 2013
Simscape, released in R2007a, contains a block called "Variable Resistor":
If you do not have access to Simscape, the attached model shows an example on how to achieve this. This model should also work in most previous versions. Note that the model contains an algebraic loop, but Simulink is able to resolve it and the simulation runs fine with correct results.
In this example model "ControlledResistor_mod_7b.slx", we are directly modifying the current going through the resistor. In a physical sense, this is exactly what a variable resistor does. It limits the amount of electrons going through it by limiting the current. A singularity at R = 0 should never happen because 0 is not a physical resistor value. It should be variable between A and B wherein A,B > 0.
For modelling in SimPowerSystems, one should think in physical terms rather than in mathematical terms. In this model, the approach of computing the voltage that you want the resistor to hold and forcing the appropriate current (I = U/R) through it with a source is taken since it is the practical method in physical terms as opposed to computing the current and forcing the corresponding voltage.
"ControlledResistor_mod_7b.slx" can be modified to "VoltageControlledResistor.slx" for cases when one needs to model a voltage-controlled variable resistor. You can modify the voltage measured across a resistor ("R_var" in the example) as desired in the function block so the resistance is a function of voltage.

  5 Comments

Show 2 older comments
fadi  kabbany
fadi kabbany on 27 Nov 2015
Dear
My name is Fadi Kabbany. I am currently a master student and I am working on a project for testing bench the inductor.
Indeed I have some troubles to control variable resistor and capacitor. so i have found on Matlab discussion under title (How can I create a variable resistor for use in SimPowerSystems) that someone sent you the model of variable resistor.
kindly, please can you forward to me this model.
Best regards Fadi kabbany
Frida Güereca Estrada
Frida Güereca Estrada on 5 Jun 2017
I'm really struggling with the same! How can I create a variable resistor for use in SimPowerSystems? The variable resistor offered in matlab does not match with it, only with SimScape! Thanks

Sign in to comment.

More Answers (9)


Sriram Narayanan
Sriram Narayanan on 13 Jan 2015
Please right-click the attachment and select "Save Link As" and then you should be able to save the attachment and open the model in Simulink.

  2 Comments

Sriram Narayanan
Sriram Narayanan on 13 Jan 2015
The models have been updated to SLX format, so, you should now be able to download the attachments without any issues.

Sign in to comment.


joelle ghattas
joelle ghattas on 22 Jun 2016
Heyyy can u attacch this file to my email joel19494@hotmail.co.uk pleaseeeee i really need it !

  1 Comment

Safaa Almaliki
Safaa Almaliki on 23 Jun 2016
Hi, please send me this file i need it .[salma9@unh.newhaven.edu]
thanks safaa

Sign in to comment.


SOUAG Noureddine
SOUAG Noureddine on 29 Jun 2016
Hello please send me the files on this adress : noureddinesouag@gmail.com
I need it in my project
Best regards

  1 Comment

Esha Bhargava
Esha Bhargava on 12 Jul 2016
Try downloading the .slx file. If you are not able to download it please contact MathWorks Technical Support

Sign in to comment.


sanae dahbi
sanae dahbi on 4 Sep 2016
hello plz i want the .mdl file of ControlledResistor_mod_7b.mdl VoltageControlledResistor.mdf note the .slx if it's possible this is my email dahbisanae@hotmail.fr Best regards

  0 Comments

Sign in to comment.


LMueller
LMueller on 23 Sep 2016
Hi, could you please send me the files as well? (There was only a zip file, but no simulink model in it when I downloaded your files) My mail address: Laura.mueller93@gmx.net Thanks! Best regards

  0 Comments

Sign in to comment.


NageswaraRao kudithi
NageswaraRao kudithi on 25 Jul 2017
hey please can you attach the file to this email:nageswarak@hindustanuniv.ac.in

  1 Comment

samia23 benyahia
samia23 benyahia on 2 Dec 2018
hi , can you send the file to this email please:sou23ya@yahoo.fr
and thanks

Sign in to comment.



Alasdair Robertson
Alasdair Robertson on 8 Nov 2017
Hi there,
I am looking into Variable Resistor models for my Masters Project I am currently carrying out. I came across this model and, though it seems helpful, I am having a bit of trouble understanding certain aspects of it.
My main issue is with the Multimeter object. I'm not entirely sure what this object is doing and how it operates. I understand its giving out a constant 100v signal from the first output, but I don't understand why the other outputs are following a trend set by the "step generator" which I'm assuming is closely representing the operation of our Variable Resistance, and then why we are subtracting this value from the initial 100v output before passing it into the dividing block.
I can see that this model is behaving as a Variable Resistor, controlling the current throughout the circuit, I'm just unsure how the Multimeter is hooked up to the step generator, and what the outputs on the multimeter are relating to.
Any help is much appreciated!
Thanks guys, Ali.

  0 Comments

Sign in to comment.

Tags

Products


Release

R2007b

Translated by