Simulink, modeling of force which is a function of AC voltage

8 views (last 30 days)
Hi All,
I am relatively new in the matlab/simulink world.
I want to model a force (output) which is dependent on the square of AC Voltage (voltage) * Constant
F(V) = K * (V^2)
AC voltage = 1 V, 1 KHz
in my attempts to model above equation, the scope does not show the results from time zero, but from 9.99 to 10 sec.
I don't understand how to model this force.
I request for the help from simulink Gurus.
thank you in advance.
regards,
Harry

Accepted Answer

Sebastian Castro
Sebastian Castro on 16 Apr 2015
To clarify your question, are you using Simulink or Simscape to model this? Also, are you running into problems with the actual equation, or just with the Scope results?
Regarding the Scope: that's a common problem. The default Scope parameters preserve a buffer of only 5000 data points. You can imagine that a 1 kHz signal requires more than 5000 points, so your Scope ends up only showing the last 0.01 seconds or so of simulation.
To change this,
  1. Open the Scope
  2. Click the "Settings" button (the gear)
  3. Go to the "History" tab and uncheck (or change the value of) the "Limit data points to last"
- Sebastian
  2 Comments
Harry_108
Harry_108 on 16 Apr 2015
Hi Sebastian,
thank you for ur kind help. ur answer has solved my problem with the scope.
further clarification about my model:
I am using simulink for this model. I have a problem in modeling the square of AC voltage.
As a first step, i have done the following
sine wave ---> math square function ---> gain block ---> force output
in stead of sine wave, I have also tried to use AC voltage block but the output of the AC voltage block can not be connected to the math square function block.
but I don't know if it the correct approach.
request for your expert guidance.
greeting,
Harry
Sebastian Castro
Sebastian Castro on 16 Apr 2015
Yep, the AC Voltage Blocks belong to the Simscape and SimPowerSystems products (there's one for each).
There are different modeling approaches where you build circuits using components like resistors, transformers, etc. instead of building equations in Simulink. Therefore, the lines require some interface blocks to connect to Simulink blocks.
Is it your plan to use these tools? If so, I'd check out some videos on the MathWorks Web site to get a feel for them.
- Sebastian

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!