MATLAB Answers

Pulsed Simulink (simscape) analog circuit with various pulses for excitation

30 views (last 30 days)
Hello everyone,
I have been coding for a while with matlab und now i started playing with Simulink (simscape). I am trying to build a circuit with different elements (C,L, RC-element,...), which actually works quit well. For excitation i want to use pulsed signals with different profiles, for example 10s positive, 100s break, 3s negative, 10s break,.... And here is my problem, the module am using (and also others) are just able to repeat the same pulse. But I cannot configure my own profile. I thought of using a Relay/switch and a second excitation module (or more), but that doesn’t not seem to be an elegant possibility (especially if I want to configure a very long profile). Do you have any ideas? Or is this the point where I actually need to build my own modules? I added a picture of my current circuit.
And I have another question. Is there a limitation of the data points for the scope module? Because as soon as I use more than 1000s the data at the beginning will be cut off with a sampling rate of 1Hz (for example if I do the simulation for 2000s, the first 500s will be cut of). If I increase the sampling Rate the data will be cut off quicker, depending on the rate (for example: 1500s; 2Hz, then the first 750s (or 1500 data points) will be cut off).
Thank you very much!

  0 Comments

Sign in to comment.

Accepted Answer

Juan Sagarduy
Juan Sagarduy on 4 Dec 2020
Hello Vincent,
I guess there is no perfect solution, different people like different methods(signal builder, look up table...).
My preference would be a Simscape look-up table or a MATLAB function for the simulation you have.
Regards Juan

  3 Comments

Vincent Bezold
Vincent Bezold on 5 Dec 2020
Thank you very much, the signal builder works quite nice!
Do you also have a solution for my second question? Because I would like to extend my Signal up to 100000 seconds.
Juan Sagarduy
Juan Sagarduy on 5 Dec 2020
Hi Vincent
I believe that the normal scope shall be able to show all points, unless the settings need modification. I can look in the model if u can share.
An alternative is to use the Simscape Explorer to visualize and log the data instead.
Br Juan

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by