Skip to main content

Posts

Search

Search Search Any Topic from Any Website Search
Recent posts

Butterworth Filter (with MATLAB + Simulator)

  Butterworth Filter Equation MATLAB designs the filter using the analog Butterworth magnitude response: |H(jω)| 2 = 1 / [ 1 + (ω / ω c ) 2n ] Where: ω c = Cutoff frequency n = Filter order ω = Signal frequency MATLAB converts this analog filter into a digital filter using the bilinear transform . Important MATLAB Functions Used Function Purpose butter() Designs Butterworth filter coefficients filtfilt() Performs zero-phase forward and backward filtering plot() Visualizes signals Example Filter Creation [b,a] = butter(order, cutoff/(Fs/2), 'low'); Why filtfilt() is Used filtered = filtfilt(b,a,demod); The filtfilt() function performs: Forward filtering Reverse filtering This removes phase distortion , producing a zero-phase filtered signal . This behavior is similar to the JavaScript forward-backward zero-phase filtering used in the simulator. MATLAB Code   clc; clear; close all ; %% Parameters fm = 5; ...

Butterworth Low-Pass Filter Online Simulator

Butterworth Low-Pass Filter Simulator Message Frequency (Hz): Carrier Frequency (Hz): Amplitude: Sampling Frequency (Hz): LPF Cutoff (Hz): Butterworth Order: Run Simulation Simulation Flow & Theory This simulator performs DSB-SC (Double Sideband Suppressed Carrier) demodulation for a user-defined message signal and carrier. The steps are as follows: Generate the message signal: m(t) = A m cos(2Ï€ f m t) Generate the carrier: c(t) = cos(2Ï€ f c t) DSB-SC modulation: s(t) = m(t) · c(t) Demodulation: multiply the modulated signal by the same carrier to get m(t) · cos²(2Ï€ f c t) Apply zero-phase Butterworth low-pass filter to remove the high-frequency term and retain the baseband message Remove DC offset to center the signal around zero Multiply by 2 to compensate the natural 1/2 scaling from cos²(θ) = (1 + cos(2θ))/2 Butterworth Filter: A first-order low-pass Butterworth filter is applied using the difference equation:...

Array Implementation of Binary Trees

Array Implementation of Binary Trees To avoid the cost of all the shifts in memory that we get from using Arrays, it is useful to implement Binary Trees with pointers from one element to the next, especially when the Binary Tree is modified often. However, if a Binary Tree is read much more frequently than it is modified, an Array implementation can make sense. It requires less memory, is easier to implement, and can be faster for certain operations due to cache locality . Cache Locality Cache locality refers to how modern CPUs optimize memory access. When a memory location is accessed, nearby memory locations are often loaded into the CPU cache as well. Because array elements are stored contiguously in memory, reading from arrays is often faster. When one element is accessed, the next elements are likely already cached and ready for use in the next CPU cycle. How Binary Trees Are Stored in Arrays Consider the following Binary Tree: R ...

Capacitive Displacement Transducer – Step by Step Solution

Capacitive Displacement Transducer – Step by Step Solution Given Plate area = \(50\,mm \times 50\,mm\) Plate spacing \(d = 0.5\,mm\) Change in capacitance \(\Delta C = 10\,pF\) Permittivity of air \[ \varepsilon_0 = 8.854 \times 10^{-12} \, F/m \] Sensitivity definition: \[ S=\frac{\Delta C}{\Delta x} \] For a parallel plate capacitive displacement transducer : \[ C=\frac{\varepsilon A}{d} \] Step 1: Convert Units Area \[ A=50\,mm \times 50\,mm \] \[ A=0.05\,m \times 0.05\,m \] \[ A=0.0025\,m^2 \] Distance \[ d=0.5\,mm \] \[ d=0.5\times10^{-3} \] \[ d=5\times10^{-4}\,m \] Step 2: Find Initial Capacitance \[ C=\varepsilon_0\frac{A}{d} \] Substitute values: \[ C=8.854\times10^{-12}\times\frac{0.0025}{5\times10^{-4}} \] First calculate fraction: \[ \frac{0.0025}{0.0005}=5 \] Thus \[ C=8.854\times10^{-12}\times5 \] \[ C=44.27\times10^{-12}F \] \[ C=44.27\,pF \] Step 3: Relation Between Displacement and Capacitanc...

Coherence Bandwidth Online Simulator

Coherence Bandwidth Simulator Signal Bandwidth (Hz) RMS Delay Spread (seconds) Channel Type AWGN (No Fading) Rayleigh Fading Rician Fading Run Simulation Coherence Bandwidth Simulator Workflow 1. Example Input Parameters Signal Bandwidth: 2 MHz RMS Delay Spread: 1 µs Channel Type: Rayleigh 2. Simulator Calculates Coherence Bandwidth The simulator estimates the coherence bandwidth of the wireless channel. Typical approximation: Bc ≈ 1 / (5 × Ï„ rms ) Stricter approximation: Bc ≈ 1 / (50 × Ï„ rms ) Example Calculation Ï„ rms = 1 µs Bc = 200 kHz 3. Compare Signal Bandwidth with Coherence Bandwidth The simulator compares the signal bandwidth with the coherence bandwidth to determine the fading type. Case 1 Signal Bandwidth < Coherence Bandwidth Result: Flat Fading Meaning: The entire signal bandwidth experiences approximately the same fading. Case 2 Signal Bandwidth > Coherence Bandwidth Result: F...

Distance and Angle in Lambertian Optical Link

Distance and Angle in Lambertian Optical Link Let’s break this step by step and understand the math behind these lines. This is from optical wireless communication , specifically calculating distances and angles for a Lambertian LED-to-photodetector link. 1. Distance from the LED to a point on the receiver plane The MATLAB line: D1 = sqrt((XR - XT(1,1)).^2 + (YR - YT(1,1)).^2 + h^2); What it means mathematically: (XT(1,1), YT(1,1)) → x, y coordinates of LED #1 on the transmitter plane. (XR, YR) → x, y coordinates of points on the receiver plane . h → vertical distance between the LED plane and the receiver plane (height). We are computing the 3D Euclidean distance from the LED to each point on the receiver plane: \[ D_1 = \sqrt{ (X_R - X_T)^2 + (Y_R - Y_T)^2 + h^2 } \] This is just the standard 3D distance formula: \[ \text{distance} = \sqrt{(\Delta x)^2 + (\Delta y)^2 + (\Delta z)^2} \] \(\Delta x = X_R - X_T\) \(\Delta y = Y_R - Y_T\) ...

Energy of a Time-Scaled Signal

Energy of a Time-Scaled Signal If a signal f(t) has energy E , then the energy of f(2t) will be: E / 2 Explanation The energy of a continuous-time signal is defined as: E = ∫ |f(t)|² dt (from -∞ to ∞) Now consider the time-scaled signal: g(t) = f(2t) Energy of g(t): Eg = ∫ |f(2t)|² dt Let: x = 2t dt = dx / 2 Substituting: Eg = ∫ |f(x)|² (dx / 2) Eg = (1/2) ∫ |f(x)|² dx Eg = E / 2 General Rule If a signal is time-scaled as f(at) , then its energy becomes: Energy = E / |a| For a = 2: Energy = E / 2 Final Answer Energy of f(2t) = E / 2 Time compression (like f(2t)) reduces the signal energy by the scaling factor.

Understanding Directivity: AVS vs Hydrophone Arrays

Directivity Comparison Between AVS Arrays and Hydrophone Arrays Underwater acoustic sensing plays an important role in applications such as marine exploration, underwater communication, sonar systems, and target tracking. To detect acoustic signals in water and determine their direction of arrival, engineers commonly use sensor arrays. Two widely used sensing technologies are hydrophone arrays and Acoustic Vector Sensor (AVS) arrays . Although both can detect underwater sound, their ability to determine the direction of incoming signals differs significantly. In this article, we explore how these two sensing approaches compare in terms of directivity , which is a key parameter describing how well a sensor focuses on signals coming from a particular direction while suppressing signals from other directions. Understanding Directivity The performance of an acoustic sensor or array is often evaluated using a metric called directivity . In simple term...

People are good at skipping over material they already know!

View Related Topics to







Contact Us

Name

Email *

Message *