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

1 次查看(过去 30 天)
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 个评论
Mathieu NOE
Mathieu NOE 2022-1-21
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

请先登录,再进行评论。

回答(1 个)

Divit
Divit 2023-10-10
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:

类别

Help CenterFile Exchange 中查找有关 Quantizers 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by