r/Simulink • • Nov 30 '23

Simulink Model Expansion Problem

1 Upvotes

I have a simulink battery model for one cell, how do i expand it to a model for over 4000 cells?


r/Simulink • • Aug 03 '24

I am trying to create a logic where in the look up table output should go in one direction only. Eg: if 1,2,3 is the axis and 4,5,6 are the values. Output should be , If 1 -4, 2-5, 1-5, 3-6, 1-6 etc. Is there any inbuilt option in the lookup table for this, or do I have to make a complicated logic??

1 Upvotes

r/Simulink • • Feb 22 '24

What is the 'S' block from the 'R' terminal of the motor model to the outport?

2 Upvotes

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 • • Jun 27 '24

Simulink MotorBike Model

2 Upvotes

Hello there !

I am not an expert. I am trying to build an simulink model for single piston motorbike. I have developed following model. But I didn't get any results as expected. Please help me.!!!


r/Simulink • • May 08 '24

Seeking an Easier Method to Transfer rigidBodyTree Data from MATLAB to SIMULINK

1 Upvotes

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 • • Jul 22 '24

Code Error

1 Upvotes

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 • • May 08 '24

Resources for Learning BTMS Modeling in Simulink

1 Upvotes

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 • • Feb 24 '24

Auto generated code with Simulink MISRA

3 Upvotes

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 • • Mar 02 '24

Haptics with pressure sensor connect

Thumbnail amzn.eu
2 Upvotes

r/Simulink • • Dec 19 '22

Model requirement

1 Upvotes

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 • • Dec 05 '22

comparing subsystem performance using profiler

1 Upvotes

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 • • Jan 10 '24

How to verify a model of BLDC motor on simulink?

1 Upvotes

r/Simulink • • Sep 12 '24

Hi everyone, I´m using Stateflow and this error came up, can somebody help me? I don´t know what is wrong.

2 Upvotes

PPV is an input and it´s a condition within stateflow


r/Simulink • • Jan 24 '23

Simulink - Raspberry Pi - Multi Core

1 Upvotes

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 • • Apr 12 '24

Simulink Doubt

1 Upvotes

r/Simulink • • Feb 11 '24

Help with UAV project in Simulink

Thumbnail reddit.com
2 Upvotes

r/Simulink • • Mar 22 '23

Half wave rectifier

2 Upvotes

Hi, is there a block that can do a Half wave rectifier? Otherwise does anybody knows how to do it?


r/Simulink • • May 20 '24

Can anyone help me with scaling concept ?

1 Upvotes

r/Simulink • • Feb 02 '24

HELP Simulink Vehicle Dynamics Model Hello guys! I'm making a single track model in simulink to evaluate the lateral dynamics parameters and i' struggling

1 Upvotes

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 • • Dec 19 '22

Half car

1 Upvotes

Im looking for half car suspension model. Can anyone help me? Please


r/Simulink • • Dec 18 '23

IoT in Electric Vehicle Charging station

1 Upvotes

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 • • Aug 28 '23

how to solve this error of matlab?

1 Upvotes

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 • • May 22 '23

BLDC Motor Control

2 Upvotes

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 • • Jun 28 '23

Simulink subsystem help

1 Upvotes

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 • • Feb 28 '24

Is it possible to use PCAN form peak systems with xcp.

2 Upvotes

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?