Questions tagged [matlab]
MATLAB is a commercial numerical computer algebra system
595 questions
0
votes
0
answers
30
views
TRP radiation pattern from 2D slices
I need your help to solve this issue.
I have 2D radiation patterns of power measurements on the XY, YZ and XZ planes.
The output is a .csv file; in the first colunm we have the rotation angle from 0 ...
-2
votes
0
answers
46
views
electric field measurment [closed]
we are measuring high power electric pulse field using d-dot sensor. the d-dot sensor gives differential signal output that we measuring it on oscilloscope.
Because we measuring differential signal. ...
0
votes
0
answers
30
views
Matlab Induction Motor Torque Characteristics
I'm having trouble with getting the correct plot from a coupled induction motor/DC generator system for an electric drives class. How it is supposed to work is the DC generator serves to simulate a ...
0
votes
0
answers
15
views
grid tied inverter with PR controller giving unstable response
I am using MATLAB for the simulation of the solar grid-tied inverter. I have used designed the PR controller as shown in the paper. As far as I understood the PR controller is trying to remove any ...
0
votes
1
answer
37
views
Using LTSpice with Matlab for periodic analysis
I am trying to run LTSpice transient simulations automatically using Matlab. Currently, I am using a simple RLC circuit before applying my code to my needs.
I want to
1: set the initial conditions of ...
0
votes
1
answer
39
views
LTspice and Matlab Gradient Descent Optimization
I am new in LTspice and optimization. Could someone please get me started on how to use LTspice and MATLAB together to run a gradient descent optimization and update the value of parameters? I am ...
0
votes
1
answer
39
views
I need help identifying the purpose and type of a block in simulink of a DC motor modelling
I need to understand the purpose and type of the block encircled in blue from this simulink simulation from which i only have images, not the actual file.
1
vote
3
answers
102
views
The bode plot of proteus simulation and matlab transfer function is not same
I am trying to calculate bode plot of a circuit.
For proteus my frequency at -63dB is 18 kHz as sample the circuit connection and its bode plot is provided.
Using analytical approach I calculate the ...
3
votes
4
answers
232
views
Why is my differential equation for mass-spring-damper model not converging with ode45 in MATLAB?
I am trying to simulate an electronical device that can be modeled by a mass-spring-damper system with an additional non-linear force. The equation at the equilibrium for the system is the following :
...
0
votes
0
answers
27
views
How can I turn on relevant lamps according to signal received from ThingSpeak in MATLAB?
We have sensors connected to power grid lines that will tell the status when there is any issue. We are trying to use ThingSpeak. We performed some initial work as shown in this link.
Manually, our ...
0
votes
2
answers
130
views
MATLAB Fourier: Why do I see less harmonics the more I increase the sampling frequency?
I made MATLAB calculate the Fourier transform of these square wave pulses which have a frequency of 60Hz. I do not understand why, the more I increase the sampling frequency, the less visible the ...
1
vote
1
answer
60
views
Changing the Limits of the Graph When Trying to Model the Shockley Equation in MatLab Shifts the Position of the Curve [closed]
I have been trying to create a piecewise linear model of a diode through curve fitting. While trying to implement the code below, I ran into a strange bug that is causing my output curve to shift to ...
0
votes
1
answer
50
views
Matlab simulation of PCB IFA
I am designing a PCB IFA and to get used to simulating it later down the road, I decided to first simulate an existing, known working design.
Known design for 0.062" Substrate (page 3)
This is ...
0
votes
1
answer
81
views
Three-phase controlled rectifier power reversal issue in MATLAB Simulink
I have built a fully controlled three-phase rectifier in MATLAB Simulink. Now according to theory for RL load as I increase firing angle from 90 deg to 180 deg, the output voltage should become more ...
0
votes
0
answers
67
views
Plotting the bode plot of a high pass filter using matlab
I am trying to theoretically find the frequency response of the circuit given below:
Firstly i found the impedance value of the RC Ladder by applying the equation below, then i defined this as "...
0
votes
0
answers
29
views
Simulink Simscape Motor Blows Up with Torque Feedback
I am trying to simulate a DC motor using the Simscape -> Electrical -> Specialized Power Systems. I try to simulate an increased inertia by using \$\tau=J\frac{d\omega}{dt}\$ where \$\tau\$ is ...
2
votes
1
answer
85
views
How can I use MATLAB to show that the Doppler effect destroys orthogonality of OFDM subcarriers?
I am trying to get a visual representation of how the Doppler effect destroys the orthogonality of the subcarrier and understand this effect.
I plotted three orthogonal subcarriers in MATLAB:
...
0
votes
1
answer
90
views
Different frequency responses for series RLC series circuit using Multisim vs. MATLAB
I have been trying to simulate the following RLC circuit:
When I simulated in Multisim Live I obtained the following frequency response, which I expected based on the values I used to calculate ...
1
vote
1
answer
129
views
How to obtain the pole zero map and step response of the 2nd order system and determine the mode of damping in the system using MATLAB?
$$\frac{C(s)}{R(s)}=\frac{\omega_n^2}{s^2+2\zeta \omega_n s+\omega_n^2}$$
Obtain the pole zero map and step response of the 2nd order system and determine the mode of damping in the system. If the ...
1
vote
2
answers
148
views
How to go with this RC circuit?
So, i've been asked to get the differential equations (or model) for this circuit:
V1=15 u(t)V, R1=10 ohm, R2 = 20 ohm, C1=10uF, C2=20uF
I'm just a beginner, and don't know if the differential ...
0
votes
0
answers
31
views
How to determine the values of transportation delay blocks and step block in block diagram?
What are the values of transportation delay blocks and step block in this block diagram to get Motor speed Graph for KI = 1.0s−1, KP = 0.3 and time delay = 0.046?
0
votes
2
answers
122
views
34401A Remote Measurement Time
I am using an HP 34401A as an ADC for data acquisition. I am triggering the device within a 'for' loop in MATLAB, so that I can synchronize the measurement with a separate device. I am able to collect ...
0
votes
0
answers
95
views
Reference Voltage Tracking for DC-DC boost converter
I have a boost converter which works perfectly with an s-domain controller (using a type-3 compensator and dual loop). Now, I need to do this using digital control (z-domain). I have converted the s-...
0
votes
0
answers
135
views
Why does my MATLAB calculation/simulation differ greatly from my LTspice simulation?
Here is my circuit in LTspice.
The frequency AC is here:
This is DC with .op command.
--- MOSFET Transistors ---
Name: m1
Model: nmos-sh
Id: ...
1
vote
1
answer
33
views
Problem with Arduino Uno sending data to MATLAB
I am sending data from an Arduino Uno to MATLAB. Below is my Arduino and MATLAB code:
Arduino Code:
...
0
votes
1
answer
151
views
How to find poles and zeroes in this kind of transfer function?
How do I find poles and zeroes from this complex transfer function?
$$
H(s)
= \frac{2959}{100\,s}
- \frac{ 171\, \Gamma\left( \frac{7447}{10000} \right)}
{200\, s^{7447/10000}}
$$
I used the ...
0
votes
0
answers
76
views
0
votes
2
answers
148
views
Issue with 3rd order Butterworth low pass filter simulation
I wrote up some code in MATLAB that's supposed to simulate the frequency response of a third order passive low pass Butterworth filter with a cutoff at 10kHz. The curve seems to match the results I ...
2
votes
2
answers
107
views
Why are the current-voltage characteristics of a bipolar transistor in MATLAB and LTspice different?
I simulated the 2N5089 bipolar transistor in both programs. The output I-V curve is completely different, although both programs use the Ebers-Moll model.
Spice-model of the transistor:
...
2
votes
1
answer
216
views
LTSpice PMOS model differs from by scratch implementation
I have this circuit in LTSpice to test a PMOS model:
and this matlab function that implements a basic pmos with the characteristics equations:
...
0
votes
0
answers
29
views
Why I am not getting same values for exported simulink variables as stepinfo?
I am using MATLAB 2015a and I am trying to get stepinfo parameters of output that was exported from Simulink to MATLAB workspace but I am not getting same values as if try to get stepinfo for MATLAB ...
1
vote
1
answer
91
views
Incorrect cutoff frequency using two Sallen-Key filters to build a bandstop filter
I'm currently having trouble troubleshooting my answer. I have to make a bandstop filter that has a cutoff frequency of 100 rad/s, and 10^6 rad/s using two Sallen-Key filters. I made the low and high ...
0
votes
0
answers
49
views
How can I correlate a RSSI value to a distance measurement more efficiently?
I want to develop a trilateration algorithm using 3 fixed advertising beacons in different parts of a room and a mobile receiver which continuously gets the RSSI values of the 3 fixed beacons and ...
0
votes
1
answer
178
views
Linear line on loglog plot
I'm trying to plot a -20dB/dec line on MATLAB but can't seem to get it correct. I know that a linear line in a loglog plot is actually an exponential curve in the linear scale.
So writing a y = mx + ...
1
vote
0
answers
76
views
Wrong plot for Ids for output characteristics (MOSFET), does new graph look reasonable?
EDIT: This is not a duplicate of 'Wrong graphs for Ids'. That one focuses on the transfer characteristics, while this one addresses the output characteristics. This distinction was also mentioned in ...
1
vote
0
answers
123
views
Wrong Graphs for Ids (MOSFET)
EDIT:
I have now obtained this graph, using the suggested changes. Does it look reasonable?
And this one maybe more clearer:
I'm writing a MATLAB script that employs Shockley's model to derive the ...
0
votes
1
answer
48
views
Confusion regarding simulation in Simulink?
Please check the attached snap especially the portion in red marked area, which is simulation stop time and it has default value of 10? Is it 10 second or any other unit? According to my experience, ...
1
vote
0
answers
47
views
How to determine beamforming pattern?
I have a beamforming vector, which includes amplitude and phase information. How can I determine the corresponding beamforming pattern for the antenna and plot it in Matlab? For example, I have a ...
2
votes
0
answers
88
views
Type 3 compensator with opamp compare calculation/simu and measured difference
I'm designing a type 3 compensator with an opamp for a flyback which is operating in a constant voltage mode.
Therefore I measured the plant and started to design a suitable type 3 compensator to ...
0
votes
2
answers
161
views
Why does MATLAB show a pole in bode plot of an underdamped second order system at natural frequency?
I am using the sisotool in MATLAB to obtain the bode plot of the following transfer function:
MATLAB marks a pole at wo which is approximately 11.18
What is the meaning of this? How would you even ...
0
votes
1
answer
298
views
Quick PMSM FOC PI controler design
For a Simulink Model I am looking for a quick and easy way to estimate PI-controller parameters for a speed control loop and Id and Iq controler of a PMSM using FOC.
I don't have a real motor just the ...
0
votes
0
answers
64
views
Stuck during designing a PI Controller
I'm trying to design a PI Controller on the basis of this paper: "Design of robust PI control systems based on sensitivity analysis and genetic algorithms." by Jau-Woei Perng • Shan-Chang ...
3
votes
0
answers
43
views
What kind of model can be used to simulate over- and under voltage in a Li-Battery pack?
So far I have not much experience with modeling in the field of lithium-ion cells or batteries except equivalent circuit models (ecm)-models which I've implemented and used for simulations in Matlab/...
0
votes
0
answers
75
views
Plotting the radiation pattern of a half-wave dipole antenna with a frequency of 144 MHz in MATLAB
I need to plot the radiation pattern of a half-wave dipole antenna with a frequency of 144 Mhz in MATLAB but I don't know the code, can someone please help me?
1
vote
0
answers
369
views
What is the Z transform of the discrete PI control model?
I have a discreate PI controller implemented in stm32 MCU, it has the following form:
$$
PI=K_p\cdot[r(t_i)-y(t_i)] + (K_I)\cdot\sum_{n=0}^{i}[r(t_n)-y(t_n)]\cdot\Delta t
$$
where
\$r(t_i)\$ is the ...
2
votes
1
answer
137
views
Rotated gyroscope 180 degrees but integration shows 90
I'm a student new to sensors. I'm currently calibrating the gyroscope from the following IMU: ICM42670. I was able to get the bias by leaving the gyro for some time and getting the average of the ...
0
votes
1
answer
82
views
pulse generator MATLAB
How to create a rectangular waveform with amplitude 18 to -3 using pulse generator? If I put 18 as the amplitude then the wave is between 18 and 0. How do I change that to 18 to -3?
2
votes
0
answers
51
views
How to have sharper rise for ideal filter frequency response in matlab
I am writing about analog filters in my blog and I decided to plot the frequency responses using matlab, representing the responses using step functions. But matlab uses heaviside function which does ...
0
votes
1
answer
353
views
Solving for Normalised Frequency with LLC Gain Equation
I would like help solving the equation below for Fn within matlab or Octave (preferably).
What I know is the following:
MG = 1.3
QE = 0.52
LN = 3.5
Because I am following this reference(https://www....
0
votes
0
answers
67
views
How to obtain a bode plot for this circuit in Matlab online version
So I've an electrical circuit in matlab as follows:
I've already setup the points of linear analysis. But I can't the option for linear analysis in the linearization tab.
The problem is that I cannot ...