# Questions tagged [matlab]

MATLAB is a commercial numerical computer algebra system

420 questions
Filter by
Sorted by
Tagged with
52k views

### How to do circuit analysis using Matlab?

I often hear of people using Matlab for circuit analysis, but I never actually figured out how it is done. I assume that there is something more to it than just setting up equations by hand and ...
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 ...
2k views

### Sine generator - Bubba Oscillator

I am trying to simulate a Bubba Ocsillator on MATLAB, Simulink . The problem is that i am not able to generate the sinusoidal from the circuit. This below is my circuit : And this below is my ...
2k views

### How to go from Matlab to Filter?

I design a filter in Matlab using these command: Fs = 2.5*10^10; n = 2; Wn = 5000/Fs; [b,a] = butter(n,Wn); and get ...
848 views

### MATLAB toolbox equivalent for embedded system

We have to develop control software to run in an embedded system. The prototype is made in Matlab (using neural network toolbox), and we want to port the software to C or C++. Do you know which ...
3k views

### How to deal with optimal power flow problem in MATLAB?

I am writing an optimal power flow (OPF) program. OPF is an optimization problem in which some decision variables like Generation, Load dispatch are adjusted in power flow program so as to minimize ...
6k views

### MATLAB to VHDL conversion

How to convert any MATLAB code(.m file) to VHDL(.hdl code). As i have to use my image processing code in a FPGA kit. Any solution? Possible method: Using hdl coder in simulink, converting the ...
2k views

### Kalman filter on linear acceleration for distance

In my application to calculate displacement from motion of accelerometer, I am using kalman filter to improve the displacement accuracy. Please note I am aware of ineffectiveness of acceleration for ...
660 views

### Help finding transfer function for root locus using Matlab

I'd like to pick $k_d$ using root locus method, but have problems deriving the necessary transfer function of the system presented below. Assume $k_p$ is fixed. The question originates from Randal ...
470 views

### How can a transfer function with only real poles show an overshoot in the step response?

I am trying to simulate the circuit below on SIMSCAPE, and its behavior is different in the simulation and in the real world. The simulation shows an overshoot, while the measurements I made do not - ...
1k views

### How can I high pass (DSP) filter a low frequency signal without introducing lag?

I need to high pass filter a signal, and my design just isn't cutting it. The part that's making it tricky is that I can't tolerate lag. I am sampling at 20Hz, the signal I care about is 1/12 to 1/...
4k views

### How to use Voltage Measurement in Matlab Simulink?

I am a beginner in MatLab Simulink and would like to measure the voltage across two electical nodes. I use Voltage Measurement to perform this task. However, i can not connect the positive and ...
654 views

### In a Delta-Sigma ADC, does noise shaping bring the noise to the signal's frequency?

I'm trying to understand the Delta-Sigma ADC. It is known that it pushes the quantization noise to be in the higher frequencies (noise shaping). Since I don't quite understand how this works, I ...
1k views

### Obtaining Poles and Zeros from frequency response

What is the process of obtaining the poles and zeros from frequency response plot or data. Any reference or Matlab code will be great help
2k views

### How to model Phase noise?

I want to model phase noise. Code below shows how I am adding phase noise in the signal. However, i am not getting correct output. That means, the signal sprectrum shoud be spreading in the frequency ...
4k views

### Calculating SNR for ADC samples

I have collected some samples for a 200Hz sine wave using an AVR microcontroller. I would like to quantify the performance of the ADC using the signal to noise ratio measurement. Theoretically, for an ...
450 views

### How to pick correct filter for a given signal processing task?

I did a study on digital signal processing and I found many theories. But I don't know how to figure out which filter to use when I get a practical signal processing task. Is there a procedure for ...
462 views

### Determining parity or FEC (Forward Error Correction) requirements from percent error

I am very new to signal processing and my background is in physics. I would like to know if it is possible to determine the number of parity bits needs to theoretically get 100% transmission from a ...
201 views

### Inferring RAM ALTERA from vhdl of HDL CODER

I've generated vhdl from Simple port RAM and Dual port RAM in simulink and I tried to synthesize with Quartus 14 and 16 on Arria V and 10. The option to allow RAM for any size is ON but I don't ...
643 views

### Band-pass filter with a given impulse response (Matlab)

I am trying to pass a .wav sound waveform through a band pass filter whose impulse response is given by $h(t)=50u(t) \exp(-10t) \sin(2 \pi 440t),$ I have imported the file into Matlab as follows:...
2k views

### Non ideal op-amp equivalent circuit output voltage

I am creating this question to ask you about a "strange" behavior I am observing in Matlab about an op-amp circuit. I am reading "Fundamentals of Electric Circuits" the 5th edition, and in the chapter ...
692 views

### Amplitude Modulation Concepts

I am currently learning about telecommunications but I have some concept issues. Firstly, does it matter if I am using cosine or sine in the equation? I understand that they are basically the same ...
339 views

### Cross Correlation values

I'm trying to develop a flow meter using the cross correlation algorithm. I'm using 2x IR leds and 2x phototransistors and a MSP430F5529. One pair of phototransistor-Led go in the upper level and the ...
2k views

### Simulating PID controller in Matlab

I am trying to explore PID control with a simulation. My problem is that the derivative term does not behave as expected in my simulation: No matter how large its coefficient it seems unable to ...
617 views

### Fixed Point MATLAB DSP Algorithm

I've got a question about coding an algorithm for a Texas Instruments TMS320C64xx DSP in MATLAB: I've got a working sloppy implementation of my filter in MATLAB. My goal is to use MATLAB Embedded ...
3k views

### How to calculate poles of overdamped, 2nd order system if only given experimental data?

I have been looking about how to calculate poles if I have experimental result of a step response in Matlab that looks like an overdamped system. So far I only found information (through internet or ...
5k views

### How do I produce a linearly chirp signal in spice?

I want to produce a chirp signal to test my PLL and found out the lock range. There is the PWL and ...
3k views

### Video & image processing in Spartan-6 FPGA

I'm very new to FPGA. I got a Spartan-6 from Digilent. As my final year project I want to do image processing through it. How can MATLAB & Simulink be used for this? How should the camera be ...
109 views

### Why my low pass digital filter amplifies in the passband?

I'm trying to implement a 10th-order Butterworth Low Pass digital filter on my MCU. To find the coefficients I used Matlab's Filter Design & Analisys Tool. So I create two little scripts: in the ...
3k views

### Describing step response in terms of poles and zeros of transfer function?

me and a friend are stuck describing something, we're both coming to terms with using matlab and we're trying to understand the design of a simple control system for controlling the steady-state error ...
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 ...
725 views

### How do I calculate impedance of a (bypass) capacitor (for simulation)?

I wanted to build a simulation of bypass capacitors in Matlab, especially to play around with pairs of different valued caps. So I thought I just take a model of a real capacitor as series connection ...
677 views

### Reduce the impact of gaussian noise on DTMF decoder

I have a Matlab code to decode digits from a given DTMF audio file (wav format). Considering the input signal to be in the form of x(n)+αv(n) where x(n) is the noise-free signal (i.e. the given DTMF ...
8k views

### How do I create a Bode plot in Matlab?

I have calculated a transfer function for a specific system (a low pass filter): $$H(j\omega)=\frac{1}{RCj\omega +1}$$ It seems to me that the standard way of plotting the frequency response of the ...
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 ...
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 ...
122 views

### Supercapacitor electric model

I am doing a dissertation in Electrical and Computer Engineer which involves supercapacitors. I read the norm IEC/EN 62391–1 and the 60384-1 but still I don't have a clear answer for what's the ...
449 views

### Pole/Zero plot is the same for passive and active (w/ gain) bandpass filter, why?

I have designed an active inverting bandpass filter, and when comparing its pole zero plot to a passive bandpass fitler with the same cutoff frequencys, the pole zero plot is exactly the same, even ...
1k views

2k views

### Calculation of inductance of rectangle coil

I'm currently working on a project about inductance. I want to calculate the inductance of a rectangle-shaped coil with a pitch different from zero. I tried this by applying the law of Biot-Savart. If ...
3k views

### Why my full-wave bridge type diode rectifier circuit begins an analysis from 8. second on Matlab Simulink?

Hi, I am working on Matlab Simulink's work page to get full-wave and half-wave bridge-type-diode rectifiers as could be seen in the picture. But, according to my Scope2 screen when I double clicked ...
882 views

### How can I model this linear power system in MATLAB?

For my power system, let us suppose it has the following dynamic model: $\ x ' = f(x,u)$. This dynamic model consists of four first order differential equations (see below). Then, I linearized ...
2k views

### Brushless motor controlled via current source math model

I'd like to model a brushless motor's (BLDC) dynamic response using Matlab. I'm controlling the motor by an Elesctonic Speed Controller (ESC). I'd like to derive a transfer function of such a circuit ...
840 views

### Complementary Code Keying

Asked the question here : I would like to understand Complementary Code Keying. How modulation and demodulation is done ? How higher data rate is achieved using CCK modulation in IEEE 802.11b ? ...
44 views

### Compute electric field in complex 3D geometry

I have a CAD file with a pretty complex geometry. I would like to compute the electric field generated by this geometry when a specific charge density is defined. I guess I will have to go through ...
184 views

### Solving a linear system of equations from a mesh analysis in the s-Domain

Here is an exercise from my Textbook in which one is asked to find the mesh currents: The first thing I did was find the s-Domain equivalent of the circuit: Now, I can write the mesh equations from ...
59 views

### How to use MATLAB to observe the effect of multiple damping factors?

I want to use MATLAB to observe the effect of changing zeta (damping factor) on system response? Here is a m-file code that plots three responses: underdamped, overdamped and critically damped. <...
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 ...