# Questions tagged [matlab]

MATLAB is a commercial numerical computer algebra system

420 questions
Filter by
Sorted by
Tagged with
58 views

### Values got from programmed PID are different from ones simulated in Simulink

Please also read Update I created a PID simulation in Simulink: where the Step block is set with parameters: ...
100 views

### How to implement a dirac delta as input signal for this system

y[n] = b0x[n] +b1x[n-1] I have this MA filter in matlab as following ...
60 views

### Using Matlab poctave function under 3 Hz

I would like to get the Fourier transform of my data from 0,5 to 80 Hz at every 1/3 octave. I tried using Matlab poctave function but that one is only working over 3 Hz. My question is there a way ...
435 views

### Using LTSPice to make Function Blocks for SIMULINK

I have a PLL that I want to model in Simulink using the control theory toolkit. I have the schematics for the PLL in LTSpice. Does anyone know of a way that I can integrate the spice model with my ...
124 views

### using IC in Matlab [closed]

I dont understand how to simulate circuits which contains IC's(like lt680xx or IC 555 timer).is it even possible to use them in matlab simulink?If yes, how can we do it?
84 views

### Fourier transform does not produce the correct result

I am trying to calculate the absolute value of a certain sinusoid to see how MATLAB calculates the Fourier Transform by using the freqz() command. Here is my Matlab code ...
39 views

### How to calculate or show in matlab/pspice the DC component from a circuit simulation?

Based on Pspice I'm simulating this RL full wave rectifier That gives the next voltage and current output at the showed probe point The idea is to extract the DC component of the current or voltage, ...
800 views

### RLC Low-Pass Filter with MATLAB

I'm trying to refresh my knowledge on RLC filters, and I'm using MATLAB to model it. Given an RLC circuit with the elements in series, taking the output at the capacitor should result in a 2nd-order ...
132 views

### Matlab: Solving homogenous set of linear equations based on Kirchhoff's circuit laws

I have got the following equivalent circuit of a common source amplifier from which I want to determine the expression for the voltage gain A = VD/VG. Because I have pretty much more difficult ...
75 views

### DC motor model issue

I use the following DC drive model: with the following parameters of the motor: Matlab variables for these parameters: ...
102 views

### “Hidden” variable in Simulink models

Some example models that are included in the Simulink library, there are some variables that their value is not visible. For instance, in the model power_PVarray_grid_det the sample time of the ...
310 views

### LT Spice Automation and automatic Plot data extraction

I am trying to automate LTspice from Matlab. I am running Lt spice netlist which is creating the .raw file. But I am unable to automatically extract the polt data after that. Any solution on how to ...
769 views

### What is causing this long tail in the transient reponse?

I have a fifth order transfer function for which I designed a controller using pole-zero cancellation technique on a root locus. I am after <5% overshoot and <2s settling time. Currently, the ...
68 views

### Discrepancy between MATLAB and Simulink closed loop response?

I have a closed loop system which I am testing in MALTAB and Simulink, expecting the same output. MATLAB ...
1k views

### Unable to set transfer function on matlab simulink

I am trying to design a p controller for which i need transfer function and I am unable to set second order equation in denominator. When I do, it shows num(s)/den(s) written inside the transfer ...
442 views

### Pole Zero Cancellation on a Root Locus

Question: ...design a controller in the feedforward path to minimise the effects of the two pairs of dominant poles. Use a pole-zero cancellation technique on a root locus diagram.... I have a 5th ...
45 views

296 views

### How to plot root loci in z plane

How to plot root loci of loop gain G(z)= k/(z-0.5)(z-0.5)(z-0.5) in z plane?
130 views

### Understanding MATLAB function blocks in Simulink

Before I ask my question, let me explain what I'm trying to do. I want to design a simple system in Simulink with the features shown below. When I say simple is that I don't need complex and large ...
243 views

### How to use the Root Locus design method to improve the transient response of my system?

By closing the loop, I need to design a controller in the feedforward path to minimise the effects of the two pairs of dominant poles of the 5th order transfer function. Use a pole-zero cancellation ...
247 views

### rlocus() - Not enough input arguments in MATLAB 2018a

I am following this tutorial on root locus methods and when writing: syms s sys = 1/(3*s^2 + 2*s - 1); rlocus(sys) I get: Error using rlocus Not enough ...
264 views

### Why does tracking different plant states result in totally different observer estimates?

I am trying to design a Luenberger observer (or a full state feedback observer) such that with one sensor available I can estimate all the states. A good tutorial is shown here. My system is 4th ...
224 views

### Simulate physical FM Transmitter circuit on Matlab Simulink

I am new to matlab. I was working on a simple modulator that I have to simulate. I've faced a problem with connecting the output frequency from the resonance circuit to the scope, A red dotted line ...
91 views

### Izhikevich Neuron model - Equations [closed]

Disclaimer: I've asked this same question before, but on StackOverflow, where I got (not so kindly) reminded that StackOverflow is not the right place for this question. I'm pretty confident that this ...
133 views

### Generating a realistic sine wave in MATLAB

I'm working on a simulation on MATLAB and I need a realistic sine wave which has harmonics. So I know there would be harmonics at 2f,3f... but I am not sure how to determine their amplitude. I tried ...
343 views

### Synchronous generator induced EMF

I have started studying synchronous generators in more detail of recent and I'm finding it difficult locating helpful information regarding their operation. What is the formula that can be used to ...
1k views

### How to calculate poles for a high order system?

I have a fourth order system which is fully controllable and observable, which needs to satisfy certain design criteria. I am trying to design a full-state feedback controller for the following ...
311 views

### Simulating a non-linear system in Simulink

I have a set of non-linear equations, which I would like to model in Simulink in order to compare to their linear counterpart. Here is the block diagram of my setup. The state-space block represents ...
41 views

### Replacing Electrical System with a Gain?

I have a system containing both a mechanical and an electrical part, as shown in the block diagram below. I am interested in simplifying this block diagram by eliminating the electrical part and ...
141 views

### Pole placement to create a full-state feedback controller?

I am learning about control theory by going through Oagata's Modern Control Engineering. As part of a practice exercise I am trying to design a full-state feedback controller that satisfies my ...
150 views

### ROM initialization in VHDL for waveform generator

I have to create a waveform generator and i used matlab to generate the sine wave. Now my TA told me to store the points from the wave in a ".mem" file then initialize the ROM by i guess importing ...
171 views

### Comparing Responses for Linear and Non-Linear System in Simulink

I am going through and reviewing this unprofessional (I highlight a potential mistake in Section3.4) paper: Nonlinear Model & Controller Design for Magnetic Levitation System Specifically, I am ...
144 views

### How to plot response of a non-linear state space model in Simulink?

I am trying to plot a non-linear model in order to compare it with it's linearized counterpart. I am following this paper Nonlinear Model & Controller Design for Magnetic Levitation System and ...
296 views

### Can the Kalman gain matrix contain negative values or absolute values greater than 1?

I have implemented an EKF in a power systems application. When I run a simulation in Matlab, in some iterations of the filter I get a Kalman gain matrix (K) with negative values and/or absolute values ...
191 views

### How can I model and simulate a resonant inductive square spiral coil in MATLAB?

I was wondering if it was possible to model and simulate my WPT system in MATLAB to determine if my analytical calculations are correct. I want to model my system in MATLAB as I have seen on MathWorks ...
600 views

### Reducing the order of transfer function while maintaining same response

Scenario: I have been going through Ogata Modern Control Engineering book and working through several exercises to improve my understanding of basic control principles. I came across the following ...
142 views

### Matlab Three Phase System Model

I have a question regarding MATLAB Simulink if anyone is familiar with the software. I usually have no problems creating basic models like this one below: I know the image is rather small. It is ...
54 views

### Reading from Keysight Scope to MATLAB

I have a DSO-S 104A scope. I have it connected through a USB 3.0 cable to a PC with MATLAB. I want MATLAB to read the waveform from the scope into a vector. I'm sampling packets of pulses, the ...
68 views

### Energy loss by Hysteresis

I recently did an experiment aiming to verify the magnetization curve of the cores of a single-phase electrical transformer. I applied a sine within one core and I observed this one and the other one ...
49 views

### Connect 3-port and 1-port devices defined by S-matrices

There are two linear networks. The first is defined by 3-port S-matrix: \\$\mathrm{S}_\mathrm{A} = \left[ \begin{array}{lll} s_{11} & s_{12} & s_{13} \\ s_{21} & s_{22} & s_{23} \\...
290 views

### How to plot input reflection coefficient in dB scale using Matlab

So I have a problem that asks to plot the input reflection coefficient of a transformer in dB scale between 0.5 GHz and 4 GHz using Matlab. Here is the code I have thus far, it is plotting in ...
98 views

### Plot of a mixed signal in matlab

I have the following signal xa=4000.*sin(2*pi*f1*t)+1000.*sin(2*pi*f2*t)+ 500.*sin(2*pi*f3*t); and the values of f1,f2 and f3...
120 views

### Holding signal true for x seconds in LabView

I'm trying to create an automatic startup override system whereby when an ESD override button is clicked, a signal will be held true for 10 seconds overriding my ESD interlocks. This seems like there ...
143 views

### Problem opening a PLECS blockset in MATLAB

A friend of mine sent his simulation of a converter for which he had used PLECS. It is in the format "example.slx". I have MATLAB R2017b. I downloaded the PLECS block set for MATLAB and activated it ...
39 views

### How can I get/calculate simulink bldc parameters

I tried to get the parameters for a bldc simulation https://de.mathworks.com/help/physmod/sps/ref/brushlessdcmotor.html I tried to find a similar motor to the I need (500 W, 20-25 Nm, geared bldc) ...
145 views

### Filtering Audio Signals in MATLAB

I'm trying to apply a filter to an audio signal in MATLAB and having some trouble processing it. So far, I have a transfer function that describes a K-weighted filter, and I am able to create a bode ...
2k views

### PI Controller Design (Ziegler-Nichols) and Unit Step Response Graphing for 4th order system

I have a system that requires a PI controller designed using the Ziegler-Nichols Methods. I would also like to plot the unit step response in Matlab, but I am getting extremely weird results. This is ...
139 views

### Sending data from Simulink Matlab to development board F28379D

I'm fairly new to Simulink programming so bear with me. My project is to measure some parameters with the ADC of the board and send them over serial (SCI_A) to a Simulink file I'm running on my PC ...