# matlab

1. ### Problem of Arduino Uno Send Data to MATLAB

Hi, I am sending data from Arduino Uno to MATLAB. Below is my Arduino and MATLAB code. Arduino Code: const float sensorVoltage=A0; void setup() { Serial.begin(9600); } void loop() { float inputVoltage2=analogRead(sensorVoltage); float voltage2=5*inputVoltage2/1024; Serial.println(voltage2); }...
2. ### How to capture live running traces from MSO7104B oscilloscope with the help of MATLAB without any delay?

I want to capture live running traces of large data points from oscilloscope and store it in matlab. I'm using Agilent MSO7104B oscilloscope.
3. ### I need help with following MATLAB Question

Hello everyone, I have started online course on MATLAB I do electrical wiring of houses and industrial plants. I have never worked on MATLAB before so if anyone please help me with my following question. Thing is that I dont understand matlab at all i dont know where to begin. Please help me...
4. ### What does these two block in mppt represent?

from the mppt, these two blocks (1; 2 mppt figure) what their function according to the code (DutyRatio https://paste.debian.net/1225049 ) ? mppt figure :
5. ### How to plot a margin(matlab) function that is a bode plot in hertz?

I am using the function margin from Matlab to get the phase margin and gain margin of a s-plane function in hertz, I looked in matlab but could not come out with proper information figure(1) margin(TF_sys)
6. ### How to Equalize 2 columns I & Q data of the 16 QAM constellation?

I need help regarding the I & Q data which I extracted from VPI simulation software. The data is for 16 QAM constellation which is distorted by chromatic dispersion. The data is in 2 columns and have 512 rows. I loaded my Tx and distorted Rx data extracted from VPI simulation software in to LMS...
7. ### MATLAB Soft-output decoder

Hello! I am not sure if this is the right place to ask, but I am stuck already a couple of days. I have implemented a soft Hamming decoder (LLRs) in MATLAB and now I have to create a soft-output for this decoder. My attempts all failed, since the soft-outputs do not match the hard-bits. The...
8. ### Design a timing recovery algorithm with predefined samples with max amplitude

I need your help in understanding how to simulate a timing recovery algorithm. I have already read a lot of literature but I have still doubts how it works. Let me briefly explain my simulation: Create a test signal: BPSK, 1000 symbol with 16 samples Raised cosine filter Compute an amplitude...
9. ### Use of MATLAB for coding, for simulation in FEMM software.

I have recently started using software FEMM to see how the magnetic flux lines flow in the magnetic core and solenoid. Now I want to change the value of current in the solenoid to see how the flux lines changes in the core. But for that I needed to do some coding the the MATLAB, but I am not...
10. ### How to move poles closer towards origin in a zero-pole map of a discrete time system in Matlab ?

Hi, I have the following zero-pole map I created of my discrete system (see attached picture) but I want to make the poles closer to the origin. Is there any matlab command or another way in which this can be accomplished ? Thanks in advance.
11. ### Hardware Board parameter missing in Matlab simulink

Hello i am using Matlab simulink and the hardware board parameter section is missing, so i think that is why i am getting the error of "Could not execute target data map file 'template_grt_rtw\template_targ_data_map' or it does not exist. Stop the target, delete the template executable...

Hello i am using matlab R2014a , and i want to know how to use simulink control design . but i can not find it , is it a tool that we have to install, or there is a way to get it , that i am missing . Thank you very much
13. ### Problem with PMSM motor model in Simulink

Good afternoon, I have developed a Vector Control for a PMSM motor in Simulink using Simscape Electrical but my motor is not spinning. I have tried applying various speed values but nothing happens. I am applying a step signal from 0 to 300 but the motor speed still doesn't move. My error...
14. ### Graphs won't be plotted to the end of simulation time in Simulink

Hi everyone, I am having the issue that I am trying to run an FOC algorithm in Simulink (see image attached) but the graphs are plotted until 0.5 when the simulation is set to 10 seconds (see image attached). Does anyone know what could be happening ? Thanks in advance. The file can be found...
15. ### How is torque controlled in Field-Oriented Control ?

Hi everyone, I am trying to control the torque in an FOC algorithm but I don't know how to. I have seen FOC block diagrams (see attached picture) and I am trying to simulate this in MATLAB but I still don't get how to control torque in my SIMULINK model (see attached picture). Also I don't...
16. ### Can't solve simulation errors in FOC model (Simulink 2020a)

Hi everyone, I am trying to develop an FOC algorithm (see screenshots attached) using the Motor Control Blockset in Simulink but I am getting the following errors (see screenshot attached). I don't know waht I am doing wrong since I fed my d and q currents to my Discrete PI controllers and fed...
17. ### How can I exctract 2 values from a 1-by-3 array in Simulink ?

Hi everyone, I am using the Surface Mount PMSM block from the Motor Control Blockset in Simulink to develop an FOC algorithm. The output of the block (PhaseCurr) is a 1-by-3 array containing my 3 phase currents a, b and c. How can I extract the 2 currents (phase a and b) from my array in...
18. ### Is the LdTrq input required in the Surface Mount PMSM block ?

Hi everyone, I am trying to implement FOC algorithm in Simulink using the Motor Control Blockset. I want to simulate the iPower Gimbal Motor GBM2804H-100T with the Surface mount PMSM block. However, I don't understand what the LdTrq input is or how to set it up. SInce it is a motor I do not...
19. ### What does Ki*Ts mean in Discrete PI controller ?

Hi everyone, I am using a Discrete PI controller for an FOC algorithm I am developing in Simulink using the Motor Control Blockset. I would like to use a Ki gain if 2. At the input of the block, I have an input labelled Ki*Ts. If I use my gain with a sampling period of, let's say 1ms, should...
20. ### Understanding how to set MTPA Reference block settings

Hi everyone, I am failrly recent to MATLAB and SIMULINK. I am trying to use to Motor Control blockset in Simulink to implement an FOC algorithm. I am using the MTPA Reference block for Simulink to calculate the Id and Iq currents for me but there are parameters in the block I don't understand...