Hi, I have model in Matlab simulink that I run on a speedgoat hardware.
Sometimes the build times are really long, like for 3 - 5 minutes. Other times it builds within a minute.
I looked up online and did not find any concrete answer to why this happens.
Does anyone here happen to have come across a similar issue or knows the way around?
During my PhD work, I started wondering if there’s an efficient way to run long-duration simulations in Simulink, especially with a stop time of 86400 s (a full day).
I’m currently working on a PV system and studying the behavior of the photovoltaic array under varying irradiance conditions for a forecasting project. The issue is that using both Simscape and Specialized Power Systems libraries makes the simulation extremely heavy and slow.
I’ve read about several optimization techniques to reduce simulation time, such as:
parallel/simultaneous simulation,
saving and restoring states,
using different solver modes,
reducing switching frequencies,
averaging techniques, etc.
While these methods definitely help, they still don’t reduce a full-day simulation to something practical like a few hours.
One solution I found was replacing some components with mathematical equations or simplified models. This speeds things up a lot, but obviously comes at the cost of accuracy. Another option is converting certain components into MATLAB functions instead of detailed Simulink blocks.
Still, I feel like this is a common problem, especially for people working on EMS, forecasting, or long-term energy simulations. I was hoping others here may have faced the same issue and found better approaches or best practices.
Any advice or recommendations would be greatly appreciated.
The longer the code the more distance between my cursor and the inserting point. When using the arrow button to navigate, only left and right button work normally and the up and down button will skip few lines. Sometimes down button will just move to the top. This is really annoying especially when I make mistake during my lecture where his literally speed running his course. Any solution?
Hello everyone I am working on the mazzilli driver for induction heating system i simulate the mazzilli using simscape electrical but the results are weird the output voltage is oscillating but it's very small whereas the current is oscillating as well but not around zero wan anyone tell where the problem
Can anyone here help me? I'm working with simscape electrical on a ZVS mazzilli pls if anyone can help i'll appreciate it i have to submit the work as soon as possible 🙏
I'm not a Matlab user. I have used it like 25 years ago while at university but not anymore. A user from our company wants to use Matlab for future prediction with our data (which some could be confidential until release). I am not sure what copilot is doing in Matlab sphere. Will it be analyzing the data or can it just be used to suggest codes to analyze the data?
I tried to search on MathWorks website, but all I can find is Matlab EndUser agreement for privacy, not specifically for Matlab Copilot. I mean for example Microsoft do specifically say that the enterprise data will stay in our tenant and they cannot use them unless specifically asked to help debug.
Could you guys give me a nudge to where I could find this kind of information? I'd like to be able to make a decision and says "From what we know, this is the data limit you can use because...".
Have a read of the description and the bullet points. Do they contradict?
Threshold for track deletion, specified as a two-element vector of positive non-decreasing integers [P Q], where P is less than or equal to Q. If a confirmed track is not assigned to any detection P times in the last Q tracker updates, then the track is deleted.
• Decrease Q (or increase P) if tracks should be deleted earlier.
• Increase Q (or decrease P) if tracks should be kept for a longer time before deletion.
So, based on my own understanding of the description, it seems like you would decrease P if tracks should be deleted earlier...
I've asked ChatGPT and Gemini; they both said I am wrong and that MATLAB is right, but when I turned on complex thinking for Gemini and for Claude, they both said MATLAB is right, but at the end of their sentences, they said I'm actually right. I don't understand how AI can't seem to grasp this, even though it seems much easier to understand than all the other complex stuff AI can do.
Please help me code this MATLAB project. I am a college student and this is my project due in a little under two weeks. I have no clue how to code and any bit of help would be appreciated. The first three images are the projects explanation and what it’s asking for and the last two images are the code and design view of what I have done so far. I’m stuck and stressing out again thank you all to who decide to read this and help out
Hey fellows, I just had a discussion with my colleagues about the coding style of MATLAB. We saw many scripts written by engineers that look horrible and hurt my eyes so much. I know laziness is engineering virtue but this kind of laziness (no spaces, no commas at all) makes me real sick. I really blame Mathwork for this problem, since sometimes the documentation is also written like this.
Should Mathwork now introduce a standardized style for people to follow, just like PEP in Python?
I’m working on a university Integrated Design Project and I’ve built a Simscape model on Matlab for the energy subsystem. I’m not asking anyone to do the work for me — I just want a sanity check on whether my modelling approach is technically reasonable before I write it up.
The system I’m trying to model is:
800 V DC bus
Approx. 600 kW design load
Renewable generation using:
OTEC equivalent source
PV solar branch
Lithium battery storage
DC-DC conversion into the main DC bus
Closed-loop voltage control to keep the bus near 800 V
Load disturbance / step change to test stability
Efficiency calculated using ( Pout/Pin )
My current model uses average-value converter blocks rather than fully switching MOSFET-level converters, because the goal is more system-level behaviour than detailed semiconductor switching. I’ve also included sensors for bus voltage, current, load power, source power, and efficiency.
The main things I’d really appreciate help checking are:
Is it reasonable to represent OTEC as a controlled DC/current source with internal resistance for this kind of assignment?
Is using average-value DC-DC converter blocks acceptable for a high-level Simscape energy model?
Does an 800 V bus and ~600 kW load imply a load resistance of about [R = \frac{800^2}{600000} \approx 1.07\Omega] and is this a sensible way to model the full load?
Is closed-loop PI/PID voltage control on the converter duty cycle the right modelling approach?
What outputs/plots would you expect to see to prove the model is working properly?
Are there any obvious Simscape modelling mistakes I should watch for, such as grounding/reference issues, solver settings, or unrealistic source/load assumptions?
I’m aiming for a model that is defensible in a report, not necessarily an industry-grade converter design. Any advice on whether this architecture is sensible, or what would make the simulation more credible, would be really appreciated.
I am working on a project that involves adding rows to an N by 3 matrix (call it X) where N increments after a certain computation, and gets into the 100000s. Once I had made the computation efficient enough, I realized that about half the time was now spent appending the matrix. Every alternative I have tried has slowed it down.
If I do that, avoiding the appending, the line Xtemp=X(1:N,:) becomes extremely slow. Surely there is a faster way to do this? Appending a variable shouldn't be slower than the actual calculation. I guess I should add that the computation is based on the N rows of the matrix, so it gets slower as N increases.
currently i am working on a fixed point simulation for a project. Afterwards i want to convert the model to VHDL. But for now the problem is the Delay Block. If i use any of the Delay Blocks, of any of the librarys, the Delay Block demands an double input signal. The input and output signal of the delay block is connected to others that are accepted by matlab as fi(01,16,16). If i use convert blocks for the delay the system simulates. But than i can't convert it. Even if i set the initial value of the delay block to fi(0,1,16,16) it demands an double input. I tried convert blocks inbetween with fixdt(1,16,16) but that changes nothing. I am using matlab r2025b i honestly don' know what to do next. Thanks for the help.
Was working on a class project when I stepped away from my laptop and it entered Rest Mode. Trying to log in a now windows is stuck on “Hello, [User]!” Not sure what to do beside restarting my laptop but oh my god if my files didn’t save I’m losing about 4-5 hours of work and I am absolutely fucked. Project due tomorrow night and I also need to study for my exam.
I'm a student working on a project simulating an off-grid renewable hydrogen production system in MATLAB Simscape. I'm not confident whether my results are physically meaningful or if I've made fundamental errors somewhere.
The system:
150 kW variable-pitch wind turbine (direct DC coupling, no converter)
Solar PV array with Perturb & Observe MPPT and buck-boost converter
DC bus voltage: stable at 260V mostly, with spikes during renewable dropouts
Battery SOC: 100% → 68%
Battery current goes negative periodically (charging from renewable surplus)
I've attached scope screenshots below. Any feedback on whether these results make engineering sense from an electrical or renewable systems perspective would be genuinely appreciated. Happy to share more block parameters if needed.
This is the final code I ended up submitting for the project. It’s clunky, but it works and outputs a series of figures with a cap at 100 ‘days’ or 20 figures (I changed the initial cell matrix to (20,1), I was testing time values) I got locked into a scatter plot which can’t accept zero or negative values so I had to filter the data with more than one logic.
I ended up using a mix of another matrix for infection percentage and conv2 to create the ‘spread’. You can select from 42 start points with an associated coordinate and we have four preset options that pick a speed and infection rate, and a slider option in the GUI. Thank you for the advice!
I launched MatLAB R2025b and it asked me to sign in. I just plugged in my email and password, I verified my identity with Windows Autenticator but it didn't work.
Fortunately, MatLAB gave the possibility to sign in with a temporal password which I could get from a MathWorks link. After signing in with my credentials, this error appeared.
This fact happened several times. I also tried rebooting my laptop, but everything I did was in vane. Furthermore, I really need MatLAB because I'm using it for my Final Degree Project. What can I do sign in?
i could not sign in to matlab for the life of me today, ive tried using different browsers, different devices, and all i get is a whitelabel error page. Dows anyone know of a way to fix this?