powergui and ideal ac source issue

I created a simscape electrical model using the Specialized Power Systems blocks and the simulation worked great. I saved my work and shut down my computer and next day I opened the model again and now the ideal voltage source is giving me a non sinusoidal output and the powergui block icon has the diconnected symbol in the corner(not sure about this). I tried to recreate the model and that did not work. Last night I installed 2019a and unistalled 2018b and now I still have the same issue and also I am getting a "out" file to my workspace from my "simout" block that I cannot use. Any help or guidance would be appreciated.

 Accepted Answer

Timothy,
Guessing based on your desciprition, it seems like the time step might not be large enough. If you're using a fixed step solver use a time step thats about 10 times the frequency of your sine wave. If you're using a variable step solver then reduce the max step size.
If you attach your model I or other people in this forum might be able to give you more concrete answer.

9 Comments

Thank you for your response. I attached the simple circuit I was using to test. At 60 Hz the output does not look correct but at 75 Hz it looks better. However, the amplitude in either case still does not look correct.
Thanks for the model.
As I supspected, the time step was too big. I changed the max step size to 100 μs which results in a proper sine wave. I have attached the model.
temp.png
Thank you very much. It worked great. I did have one more question if you have a minute. How do you change the output of the "to workspace" to output only the variable to the "workspace" instead of the "out" file?
I am not sure what you mean by output the variable instead of the file. Any data you see in workspace is a variable. The block saves the data in the format of timeseries by default.
When I run the model, I get a variable called simout in my workspace which consists of 2 columns: time & voltage. This is the output i would expect from the To Workspace block
In the 2018b version I did get that but as soon as i updated to the 2019a I get an out variable that I then have to access using (out.simout) for example.
Timothy,
I tried this out on 2019a, but I was unable to replicate your issue.
Double click the To Workspace block and make sure that the Save Format is set to Timeseries
Thank you again for your response. I still cannot figure this out. I have asked a couple of people and they are not sure either. I attached a screen shot of the output from the simple circuit we talked about earlier.
Thanks again.
Thanks for the screenshot.
You have the Single simulation output option enabled in the configuration parameters. Disabling this should give you just the timerseries or whatever format you select in the To workspace block. See the image below
temp.png
That was it! Thank you very much for your help.
Tim

Sign in to comment.

More Answers (0)

Categories

Tags

Community Treasure Hunt

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

Start Hunting!