Skip to main content
Home Wireless Communication Modulation MATLAB Beamforming Project Ideas MIMO Computer Networks

How to use MATLAB Simulink

 

MATLAB Simulink is a popular add-on of MATLAB. Here, you can use different blocks like modulator, demodulator, AWGN channel, etc. And you can do experiments on your own.

 


 

 

Steps

  1. Go to the 'Simulink' tab at the top navbar of MATLAB. If not found, click on the add-on tab, search 'Simulink,' and then click on it to add.
  2. Once you installed the simulation, click the 'new' tap at the top left corner.
  3. Then, search the required blocks in the 'Simulink library.' Then, drag it to the editor space.
  4. You can double-click on the blocks to see the input parameters
  5. Then, connect the blocks by dragging a line from one block's output terminal to another block's input.
  6. If the connection is complete, click the 'run' tab in the middle of the top navbar.  
  7. After clicking on the run button, your Simulink is ready. Then double-click on any block to see the output
  8.  
  9. The following block diagram is an example of the MATLAB simulation of 'QPSK' or quadrature phase shift keying.
  1.  
    Fig: QPSK Modulation and Demodulation
     
     
     

    In the above figure, for QPSK modulation and demodulation, we've used blocks like Random Integer Generator to generate the random integers 0, 1, 2, and 3, which are the inputs of the QPSK modulators. Then, the signal passes thru the AWGN channel. At the receiver side, we demodulate the signal using a QPSK demodulator. A scope is connected to the output terminal of the demodulator. Scopes are used to visualize the output signal.


People are good at skipping over material they already know!

View Related Topics to







Admin & Author: Salim

profile

  Website: www.salimwireless.com
  Interests: Signal Processing, Telecommunication, 5G Technology, Present & Future Wireless Technologies, Digital Signal Processing, Computer Networks, Millimeter Wave Band Channel, Web Development
  Seeking an opportunity in the Teaching or Electronics & Telecommunication domains.
  Possess M.Tech in Electronic Communication Systems.


Contact Us

Name

Email *

Message *

Popular Posts

Channel Estimation utilizing Decision Feedback Equalizer (DFE)

  Channel estimation using DFE is a similar process to a non-linear equalization process. In DFE (decision feed equalizer), equalization error bits/symbols between the feedforward tabs and feedback taps are calculated continuously. And equalizer's tap weights tap weights are updated correspondingly.  In plain language, the error between the received bits and known training bits is calculated, and tap weights are updated accordingly. The equalizer estimates the channel impulse response (CIR) .  Once we find the channel impulse response or channel information, we can easily retrieve the original message signal from the noisy data. In the communication process, the whole system is modeled as a linear time-invariant (LTI) system. And  y = h*x + n where, y = received signal            x = transmitted signal           n = additive white Gaussian noise [Read more about the Linear time-invariant (LTI) system and convolu...

MATLAB code for GMSK

  Copy the MATLAB code from here  % The code is developed by SalimWireless.com clc; clear; close all; % Parameters samples_per_bit = 36; bit_duration = 1; num_bits = 20; sample_interval = bit_duration / samples_per_bit; time_vector = 0:sample_interval:(num_bits * bit_duration); time_vector(end) = []; % Generate and modulate binary data binary_data = randi([0, 1], 1, num_bits); modulated_bits = 2 * binary_data - 1; upsampled_signal = kron(modulated_bits, ones(1, samples_per_bit)); figure; plot(time_vector, upsampled_signal); title('Message Signal'); % Apply Gaussian filter filtered_signal = conv(GMSK_gaussian_filter1(bit_duration, samples_per_bit), upsampled_signal); filtered_signal = [filtered_signal, filtered_signal(end)]; figure; plot(filtered_signal); title('Filtered Signal'); % Integration & GMSK modulation integrated_signal = cumsum(filtered_signal); gmsk_signal = exp(1i * integrated_signal); % Plotting the real and imaginary parts of the GMSK signal ...

BER vs SNR for M-ary QAM, M-ary PSK, QPSK, BPSK, ...

Modulation Constellation Diagrams BER vs. SNR BER vs SNR for M-QAM, M-PSK, QPSk, BPSK, ... 1. What is Bit Error Rate (BER)? The abbreviation BER stands for bit error rate, which indicates how many corrupted bits are received (after the demodulation process) compared to the total number of bits sent in a communication process. It is defined as,  In mathematics, BER = (number of bits received in error / total number of transmitted bits)  On the other hand, SNR refers to the signal-to-noise power ratio. For ease of calculation, we commonly convert it to dB or decibels.   2. What is Signal the signal-to-noise ratio (SNR)? SNR = signal power/noise power (SNR is a ratio of signal power to noise power) SNR (in dB) = 10*log(signal power / noise power) [base 10] For instance, the SNR for a given communication system is 3dB. So, SNR (in ratio) = 10^{SNR (in dB) / 10} = 2 Therefore, in this instance,...

MATLAB Code for QAM (Quadrature Amplitude Modulation)

  One of the best-performing modulation techniques is QAM [↗] . Here, we modulate the symbols by varying the carrier signal's amplitude and phase in response to the variation in the message signal (or voltage variation). So, we may say that QAM is a combination of phase and amplitude modulation. Additionally, it performs better than ASK or PSK [↗] . In fact, any constellation for any type of modulation, signal set (or, symbols) is structured in a way that prevents them from interacting further by being distinct by phase, amplitude, or frequency. MATLAB Script (for 4-QAM) % This code is written by SalimWirelss.Com % This is an example of 4-QAM. Here constellation size is 4 % or total number of symbols/signals is 4 % We need 2 bits once to represent four constellation points % QAM modulation is the combination of Amplitude modulation plus % Phase Modulation. We map the decimal value of the input symbols, i.e., % 00, 01, 10, 11 to 1 + 1i, -1 + 1i, 1 - 1i, and -1 - 1i, respectively. cl...

Constellation Diagrams of ASK, PSK, and FSK

Modulation ASK, FSK & PSK Constellation BASK (Binary ASK) Modulation: Transmits one of two signals: 0 or -√Eb, where Eb​ is the energy per bit. These signals represent binary 0 and 1.  BFSK (Binary FSK) Modulation: Transmits one of two signals: +√Eb​ ( On the y-axis, the phase shift of 90 degrees with respect to the x-axis, which is also termed phase offset ) or √Eb (on x-axis), where Eb​ is the energy per bit. These signals represent binary 0 and 1.  BPSK (Binary PSK) Modulation: Transmits one of two signals: +√Eb​ or -√Eb (they differ by 180 degree phase shift), where Eb​ is the energy per bit. These signals represent binary 0 and 1.  This article will primarily discuss constellation diagrams, as well as what constellation diagrams tell us and the significance of constellation diagrams. Constellation diagrams can often demonstrate how the amplitude and phase of signals or symbols differ. These two characteristics lessen the interference between t...

MATLAB code for BER vs SNR for M-QAM, M-PSK, QPSk, BPSK, ...

Modulation Constellation Diagrams BER vs. SNR MATLAB code for BER vs SNR for M-QAM, M-PSK, QPSk, BPSK, ...   MATLAB Script for  BER vs. SNR for M-QAM, M-PSK, QPSk, BPSK %Written by Salim Wireless %Visit www.salimwireless.com for study materials on wireless communication %or, if you want to learn how to code in MATLAB clc; clear; close all; % Parameters num_symbols = 1e5; % Number of symbols snr_db = -20:2:20; % Range of SNR values in dB % PSK orders to be tested psk_orders = [2, 4, 8, 16, 32]; % QAM orders to be tested qam_orders = [4, 16, 64, 256]; % Initialize BER arrays ber_psk_results = zeros(length(psk_orders), length(snr_db)); ber_qam_results = zeros(length(qam_orders), length(snr_db)); % BER calculation for each PSK order and SNR value for i = 1:length(psk_orders) psk_order = psk_orders(i); for j = 1:length(snr_db) % Generate random symbols data_symbols = randi([0, psk...

Comparisons among ASK, PSK, and FSK | And the definitions of each

Modulation ASK, FSK & PSK Constellation MATLAB Simulink MATLAB Code Comparisons among ASK, PSK, and FSK    Comparisons among ASK, PSK, and FSK Comparison among ASK,  FSK, and PSK Performance Comparison: 1. Noise Sensitivity:    - ASK is the most sensitive to noise due to its reliance on amplitude variations.    - PSK is less sensitive to noise compared to ASK.    - FSK is relatively more robust against noise, making it suitable for noisy environments. 2. Bandwidth Efficiency:    - PSK is the most bandwidth-efficient, requiring less bandwidth than FSK for the same data rate.    - FSK requires wider bandwidth compared to PSK.    - ASK's bandwidth efficiency lies between FSK and PSK. Bandwidth Calculator for ASK, FSK, and PSK The baud rate represents the number of symbols transmitted per second Select Modulation Type: ASK...

Minimum Shift Keying (MSK)

  Minimum shift keying (MSK) is a type of continuous frequency shift keying (CFSK). Like continuous frequency shift keying, we can also define bit "1" and "0" by two distinct frequency carriers, but the frequency shift will be half of the baud rate, i.e., f2 - f1 will be Rb/2. where f2 is the carrier frequency for binary bit "1" f1 is the carrier frequency for binary bit "0" Rb = Baud Rate   Here, the frequency shift between two carrier frequencies is minimum (Baud Rate) / 2. So, it is called minimum shift keying. Steps for minimum shift keying 1. Firstly, generate a bitstream of binary bits "1" and "0" 2. Then Convert it to NRZ Signal 3. Then perform MSK modulation on the NRZ Signal 4. If the carrier frequency is fc, then bit "1" will be represented by slightly higher than the carrier frequency, fc + (baud rate)/4, and bit "0" by slightly lower than the carrier frequency, fc - (baud rate)/4. Gaussian minim...