Clear Filters
Clear Filters

After sampling a signal, I want to scale the sampled data before quantisation

5 views (last 30 days)
I want to sample a signal, then scale the input samples before quantization.
Any idea how I can achieve this?
I was thinking using the ADC block in simulink, but that does not allow me scale the samples before the quantizations.
  1 Comment
Mathieu NOE
Mathieu NOE on 21 Jan 2022
hello
why not using a simple gain block ? or does the gain factor follow the signal envelop ? then you can use a buffer , pick the max valueand use that to regularly update the gain value

Sign in to comment.

Answers (1)

Divit
Divit on 10 Oct 2023
Hi Ivan,
I understand that post sampling you would like to scale your signal prior to its quantization.
You can scale your input samples before quantization in Simulink by adding a Gain block before the Quantizer block. Here is a step-by-step guide:
  1. Add the Gain Block: In your Simulink model, go to the Simulink Library Browser, then navigate to "Simulink" -> "Math Operations" and drag and drop the "Gain" block into your model.
  2. Configure the Gain Block: Double-click on the Gain block to open its parameters window. In the "Gain" field, enter the scale factor you want to apply to your samples. Click "OK" to close the window.
  3. Connect the Blocks: Connect your signal source/sampled signal to the input of the Gain block and connect the output of the Gain block to the input of your Quantizer block.
Please note that scaling the samples can change the dynamic range of your signal, so make sure the Quantizer block is set up to handle the scaled values correctly. You may need to adjust the "Quantization interval" parameter of the Quantizer block to match the range of the scaled samples.
To know more you can refer to the following documentation links:

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!