0

I'm trying to model a large electrical network of resistors and capacitors in SimScape using Electrical foundation library blocks. One of the resistors needs to change its resistance as a function of time, say like this:

R=R0*(1-delR*(1-exp(-t))

where R is resistance, R0 is the initial resistance, delR is the factor by which I want the resistance to decrease and t is time. I can't figure out how to incorporate time variance at all in to the simscape model(as I can't seem to access a time variable). There is a variable resistance block available, but I'm facing the same problem there as well, as it seems to be built to vary with respect to voltage. I'm using Matlab 2016a.

Venkat
  • 446
  • 1
  • 4
  • 15

1 Answers1

0

You can either:

  • Use the variable resistance block in conjunction with the clock block to achieve this.
  • Build your own block (a good starting point is the source code for variable resistance). And use the time keyword:

https://www.mathworks.com/help/physmod/simscape/lang/time.html

Your equations could look something like:

let R = R0 * (1 - delR * (1 - exp(time)); in v == R * i;

ngautier
  • 86
  • 3