Skip to main content

Posts

Search

Search Search Any Topic from Any Website Search
Recent posts

Frequency and Phase Sensitivity

Frequency and Phase Sensitivity of a Modulated Signal 1. General Angle-Modulated Signal $$ s(t) = A_c \cos[\theta(t)] $$ $$ \theta(t) = \omega_c t + \phi(t) $$ 2. Frequency Sensitivity (FM) $$ f_i(t) = \frac{1}{2\pi} \frac{d\theta(t)}{dt} $$ $$ f_i(t) = \frac{1}{2\pi} \left(\omega_c + \frac{d\phi(t)}{dt}\right) $$ For FM: $$ \phi(t) = k_f \int m(t)\,dt $$ $$ f_i(t) = f_c + \frac{k_f}{2\pi} m(t) $$ $$ k_f = \frac{d\omega_i(t)}{dm(t)} $$ 3. Phase Sensitivity (PM) $$ \phi(t) = k_p m(t) $$ $$ f_i(t) = f_c + \frac{k_p}{2\pi} \frac{dm(t)}{dt} $$ $$ k_p = \frac{d\phi(t)}{dm(t)} $$ 4. Example Signal Analysis Given Signal $$ x(t) = 3\cos\left[2\pi \cdot 10^6 t + 2\sin(2\pi \cdot 10^3 t)\right] $$ Step 1: Identify Components Carrier amplitude: \( A_c = 3 \) Carrier frequency: \( f_c = 10^6 \) Hz Modulating frequency: \( f_m = 10^3 \) Hz Step 2: Compare with Standard FM Form Standard FM form: $$ x(t) = A_c \cos\left...

DOM manipulations in JavaScript

Interactive DOM manipulation Experiment with DOM manipulation and see the code behind it. 1. Dynamic Text Update ( textContent ) Output: Nothing yet Code concept: let value = document.getElementById('userInput').value; This retrieves the text typed by the user. We then update the output with: document.getElementById('output').textContent = value; 2. Style Manipulation Change Output Color Code concept: element.style.color = 'red'; This directly modifies the CSS of an element. We toggle between red and blue dynamically. 3. Creating Elements ( appendChild ) Add New Element Container for new elements: Code concept: let div = document.createElement('div'); creates a new div. container.appendChild(div); adds it to the DOM. 4....

SQL Query Online Simulator – Run & Practice SQL in Browser

SQL Query Online Simulator – Run & Practice SQL in Browser SELECT * FROM customers Run Export CSV Chart Dark Query History How to Use This Simulator Write your SQL query in the input box. Click Run to execute the query. View results in the table below. Use Export CSV to download results. Use Chart to visualize data. Click previous queries from history to reuse them. 📘 Sample SQL Commands SELECT * FROM customers WHERE example - SELECT * FROM customers WHERE Country='Germany' INSERT example - INSERT INTO customers VALUES ('John','Delhi','India') UPDATE example - UPDATE customers SET City='Mumbai' WHERE CustomerID=1 DELETE example - DELETE FROM customers WHERE CustomerID=2

MSE vs RMSE: Differences and Use Cases

MSE vs RMSE: Differences and Use Cases Both MSE (Mean Squared Error) and RMSE (Root Mean Squared Error) are metrics used to evaluate predictive models, especially in regression. They have different characteristics and are used in different scenarios. 1. MSE (Mean Squared Error) Definition: MSE = (1/n) Σ (yáµ¢ - Å·áµ¢)² where yáµ¢ is the true value, Å·áµ¢ is the predicted value, and n is the number of samples. Characteristics: Squares differences → penalizes large errors more heavily. Units are squared compared to the original data. Smooth and differentiable → useful for optimization during model training. Use Cases: Model training / loss function: Commonly used as a loss function in machine learning, e.g., LSTM, Transformer, linear regression. Penalizing large errors: Useful in applications sensitive to large mistakes, such as stock price or weather pr...

Object-Relational Mapping (ORM)

What is ORM? ORM stands for Object-Relational Mapping . It allows you to interact with a relational database using objects in your code instead of raw SQL queries. Essentially, it maps database tables to classes and rows to objects. How it Works Database table → Class Row in table → Instance of class (object) Columns → Attributes of the object SQL queries → Methods on objects Example: Suppose you have a users table in your database: id name email 1 Alice alice@mail.com 2 Bob bob@mail.com from sqlalchemy import Column, Integer, String from sqlalchemy.orm import declarative_base Base = declarative_base() class User(Base): __tablenam...

Transformer and Positional Encoding

Positional Encoding vs Transformer Encoder Understanding the difference between positional encoding and encoder in a Transformer model. Core Difference Concept Meaning Positional Encoding Adds position information to input tokens Encoder (Transformer Encoder) Learns relationships and representations using attention 1. Positional Encoding (PE) Transformers don’t understand order by default (unlike LSTMs). Positional encoding tells the model: “This token is at position 1, 2, 3…” Why Needed Without positional encoding: [x1, x2, x3] = [x3, x1, x2] (incorrect) With positional encoding: [x1+p1, x2+p2, x3+p3] (correct) Formula (Sinusoidal) ...

LSTM vs Transformer for Time Series Prediction

Stacked LSTM vs Transformer for Time Series Prediction 1. Stacked LSTM LSTM is a type of Recurrent Neural Network (RNN)... Architecture Input sequence → LSTM layer 1 → LSTM layer 2 → Dense → Output Mathematics LSTM uses gates to control information flow: Forget gate \(f_t\): \[ f_t = σ(W_f · [h_{t-1}, x_t] + b_f) \] Input gate \(i_t\) and candidate state \(C̃_t\): \[ i_t = σ(W_i · [h_{t-1}, x_t] + b_i) \] \[ C̃_t = tanh(W_C · [h_{t-1}, x_t] + b_C) \] Cell state update \(C_t\): \[ C_t = f_t ⊙ C_{t-1} + i_t ⊙ C̃_t \] Output gate \(o_t\) and hidden state \(h_t\): \[ o_t = σ(W_o · [h_{t-1}, x_t] + b_o) \] \[ h_t = o_t ⊙ tanh(C_t) \] Where \(x_t\) is the input, \(h_...

People are good at skipping over material they already know!

View Related Topics to







Contact Us

Name

Email *

Message *