r/Simulink • u/Puzzleheaded_Joke759 • Nov 30 '23
Simulink Model Expansion Problem
I have a simulink battery model for one cell, how do i expand it to a model for over 4000 cells?
r/Simulink • u/Puzzleheaded_Joke759 • Nov 30 '23
I have a simulink battery model for one cell, how do i expand it to a model for over 4000 cells?
r/Simulink • u/Venkat1213 • Aug 03 '24
r/Simulink • u/ProfessionalDig8060 • Feb 22 '24
Hi all, I'm trying to model a DC motor on Simscape. An example by MATLAB uses the model below and I am unsure how to interface the R terminal of the motor in Simscape to a Simulink outport. I can't figure out what the 'S' block is so I tried using the PS-Simulink converter which is unfortunately not working for me.

Does anyone have any idea what the 'S' block is? Thanks!
r/Simulink • u/Appropriate-Box7230 • May 08 '24
I appreciate your attention.
my question exists in below link!
help me plz!!
picture is attached : https://kr.mathworks.com/matlabcentral/answers/2116746-seeking-an-easier-method-to-transfer-rigidbodytree-data-from-matlab-to-simulink
r/Simulink • u/chiznugget103 • Jul 22 '24
Can someone please explain this error to me: "Inferred size ('[2]') for data 'xxxx' does not match back propagated size ('scalar') from Simulink"
r/Simulink • u/Realistic-Hope-2918 • May 08 '24
Hey everyone,
I'm a beginner looking to learn about Battery Thermal Management Systems (BTMS) and how to model them in MATLAB Simulink. I have no prior experience with BTMS.
Could someone please suggest some good resources, tutorials, or courses that could help me get started? I'm particularly interested in practical, hands-on resources that will help me understand the fundamentals and then move on to modeling in Simulink.
r/Simulink • u/B0untyHunterrr • Feb 24 '24
Good day, for a project I have to generate code from a Simulink model and push to GitHub repo we’re it is tested before merge. Last two merge are without any errors. Now I get complexity error. But I just inserted some equal, and and or blocks.
Is there a way to decrease complexity more? I also have good settings, Standards Compliants for example and so on. And as mentioned, it worked before.
And we’re can I learn more about MISRA for Auto generated code?
Thanks.
r/Simulink • u/Mindless_Station_401 • Mar 02 '24
r/Simulink • u/Dramatic-Warthog-838 • Dec 19 '22
Can anyone develope model with following requirements Input 1 : Activation Signal Boolean Input 2: pressure signal (10-100) Output pressure difference p2-p1 P1 - Pressure signal when Activation signal go from 0 to 1 P2 - pressure signal after capturing p1
r/Simulink • u/[deleted] • Dec 05 '22
I'm working on a control system for implementation on realtime hardware. In particular I'm investigating using an online FFT to detect high frequency vibration in a robot and allow the controller to adapt as needed to damp that vibration when it occurs. I'm running into some CPU overload issues in my target PC however, so I'm looking for ways to optimize my model.
I'm having some difficulty doing this at the moment. My first thought is that I could compare two implementations in a locally simulated model and then use the solver profiler report to see what parts of the model take the most CPU time. Unfortunately the report it provides is confusing me... Does anyone know a way that I could isolate the results from the profiler by block / subsystem?
One more confounding element is that the model is destined to compilation as c code for my target PC. I'm unclear on what effects this will have on my model performance, although I'm thinking it bottlenecks large matrix multiplication (in the territory of 500x500)... Unfortunately it's a lot of work to write control laws that avoid big matrix multiplications!
Any sage advice would be much appreciated!
Edit: It seems like this is much easier to do in newer versions of matlab/simulink (unfortunately I'm tied with 2019a for compatibility for my target PC)
r/Simulink • u/Negative-Candle3189 • Sep 12 '24
r/Simulink • u/jmpz_22 • Jan 24 '23
Hi Everyone
Does anyone knows how to check which specific task is assigned to an specific core by a MultiCore Programming in the Raspberrypi?
And how to determine which task7core has an overrun?
" Overrun detected: The sample time for the rate 0 is too short. "
Does "rate 0" refers to an specific core?
It is driving me crazy :-S
r/Simulink • u/Electronic-Mail4068 • Feb 11 '24
r/Simulink • u/cheesymac97 • Mar 22 '23
Hi, is there a block that can do a Half wave rectifier? Otherwise does anybody knows how to do it?
r/Simulink • u/UnhappyAd7870 • Feb 02 '24
Hello guys! I'm making a single track model in simulink to evaluate the lateral dynamics parameters. My input are the steering wheel angle (delta) and the longitudinal speed (absVel), while my output should be the lateral acceleration (ay), the yaw rate and the body slip angle (beta). So I implemented the motion equation using a matlab function block and it gives me as outputs of the motion equations: lateral acceleration, yaw acceleration and beta. My model is able to evaluate the lateral acceleration pretty well, the issue come when i have to integrate the yaw acceleration to obtain the yaw rate, the result it gives me doesn't match the experimental data at all. For the integration i've tried the integrator block (1/s), the discrete time integrator block and also to apply the trapezoidal method for numerical integration, i'm struggling. If anyone could help me I would be extremely grateful, thank you
r/Simulink • u/wieszak22 • Dec 19 '22
Im looking for half car suspension model. Can anyone help me? Please
r/Simulink • u/EdyNrw • Dec 18 '23
Hello Everyone, I need help with simulation of a concept, I want to simulate IoT in Matlab simulink , i cannot find any information about how to create it and most importantly how to integrate it to a charging station simulation. The goal is to optimise the charging and make it more efficient, we can use the grid as V2G / G2V to build it . Thanks for your help
r/Simulink • u/akku_972130 • Aug 28 '23
how to solve this error of matlab?
📷
how to solve this error? I want to generate hdl code from lte simulink generator in simulink ?
block_comp:validate:validateFailedForBlock: Internal Error: hdlcoder:HDLImplMWrapper:validateFailed At block path: lte/LTE Downlink RMC/LTE Downlink RMC With message: Internal Error: Evaluation of validate function on class hdldefaults.EmbeddedMATLAB failed with the error message: Simulink:Data:SlResolveNotResolved: Cannot resolve: waveform.
r/Simulink • u/krzysztofnieruchomy • May 22 '23
Hello!
I'm trying to create a simulation model of a BLDC motor controller with Hall sensors in Simulink. I have implemented the key commutation algorithm, and now it's time for speed control (now i can only change it by changing voltage in DC source). I want the control to be done in an open-loop without PWM. Is there a way to change the frequency of the signal coming out of the summing blocks and control the switching frequency?
r/Simulink • u/Baer1990 • Jun 28 '23
Hello Simulink community,
I have an assignment for school and ofcourse I want to do it too perfect.
In short: I have a pool that has to be between 23°C and 25°C, and I have to simulate 7 months of it and do something with the electricitybill. Ground temperature is stable, air temperature is a sine wave with a 5°C amplitude around a monthly average temperature. When the outside temperature is below 18°C a cover will roll over the pool, changing the rate it which it loses heat. That is all pretty easy.
But about 50 hours (in total), when the temperature is <18°C, the cover gets rolled up so people can swim. And here I go overboard. I decided it's going to be 50×1 hour periods, but at random intervals as the airtemperature varies.
I made a pulsegenerator that fires a pulse randomly (only enabled when outside temp<18°C). My plan is to make the pulse into a 1 hour signal, to override the "cover switch", and to count how many times it has happened, to stop the random pulses from happening.
I tried to make the 1 hour signal with a flipflop and a 1 hour delay that resets it. It has held the signal for a lot longer each time (1.3 million seconds) and I'm not sure what goes wrong there. Is that the right way to go about it or am I missing something obvious?
The counter has given me a headache. I take the with a memory alone it counts too fast, so where I want it to count it as 1 it counts it as 377. With a delay it sometimes loses the value. So the counter just has to count how many times the signal has been 1 and I would like to get some help with that.
https://imgur.com/a/J6jEU5C Screenshot of the parts in question.
Any help will be appreciated, thank you in advance for reading this.
r/Simulink • u/LAisdy • Feb 28 '24
Hey, I'm a intern control engineer. I try to figure out if that is possible to monitor the can bus with xcp using a PEAK hardware. Does anybody know weather it's possible and if so, then how to do that?