SIMCom SIM900 AUDIO GSM/GPRS module Application Note
Pubblicità
Pubblicità
SIM900 AUDIO Application Note
SIM900 AUDIO Application
Note
AN_SIM900_AUDIO_V1.00
SIM900 AUDIO Application Note
Document name:
Version:
AUDIO Application Note
1.00
Author:
Date:
Status:
Document Control ID:
Ren Dong
2010-06-25
Release
AN_SIM900_AUDIO_V1.00
General Notes
SIMCom offers this information as a service to its customers, to support application and engineering efforts that use the products designed by SIMCom. The information provided is based upon requirements specifically provided to SIMCom by the customers. SIMCom has not undertaken any independent search for additional relevant information, including any information that may be in the customer’s possession.
Furthermore, system validation of this product designed by SIMCom within a larger electronic system remains the responsibility of the customer or the customer’s system integrator. All specifications supplied herein are subject to change.
Copyright
This document contains proprietary technical information which is the property of Shanghai SIMCom
Wireless Solutions Ltd, copying of this document and giving it to others and the using or communication of the contents thereof, are forbidden without express authority. Offenders are liable to the payment of damages. All rights reserved in the event of grant of a patent or the registration of a utility model or design.
All specification supplied herein are subject to change without notice at any time.
Copyright © Shanghai SIMCom Wireless Solutions Ltd. 2010
SIM900 AUDIO Application Note
Version History
Version Chapter
V1.00 New version
What is new
Created the doc
SIM900 AUDIO Application Note
SES
FAP
SLR
RLR
Preface
This document introduces SIM900-series audio application method, emphasizes SIM900 echo algorithm principle and tuning technology.
Abbreviations
Terms Explanation
Selective Echo Suppression
Fast Affine Projection
Sending Loudness Rating
Receiving Loudness Rating
SIM900 AUDIO Application Note
Contents
SIM900 AUDIO Application Note
1. SIM900 echo algorithm brief introduction
SIM900 echo solutions are divided into three parts: EC (Echo Cancellation), ES (Echo Suppression) and SES (Selective Echo Suppression).
1.1 Echo cancellation
Fig.1 Echo cancellation architecture
The objective of the echo canceller is to adapt an all-zero predictive filter (yellow cells) to match the transfer function of the external electro-acoustic path between speaker and a mike. Once the adaptive filter converges, subtracting the predictor filter output from the mike path signal is sufficient to remove the echo.
Unfortunately, the echo path transfer function may vary significantly over the duration of a voice call.
Hence, the predictor filter coefficients must be continually updated. The adaptation of coefficient is the task of the modified FAP algorithm (green cell). The modified FAP (Fast Affine Projection) is an efficient algorithm to accelerate convergence of the predictor filter.
The predictor filter should only be updated when a strong correlation exists between the speaker and mike signals. Tuning when the speaker (downlink) signal is idle or when both downlink and uplink signals are active(the “double talk” condition) will inhibit convergence and may even cause the filter to diverge.
The adaptation control logic (pink modules) tracks the activity of the far-end and near-end speech and adjusts the adaptation step size accordingly. When the far-end signal is idle, adaptation stops. When far-end only speech is present, the filter adapts aggressively. During double-talk, the filter tunes very slowly (or not at all).Since both near and far end speeches are non-stationary, detection of double-talk is not black and white. By using a variable step-size for filter updates the echo canceller can gracefully react to the uncertainties in doubletalk detection, etc.
This algorithm applies to uplink channel, and it is the main recommended audio algorithm at
SIM900 AUDIO Application Note
SIM900. SIMCom embedded software has already configured appropriate parameter. For most of the handset phone users, the device would not bring echo, so it does not need to have any future adjustment.
1.2 Echo suppression
Its goal is to reduce the mike path gain in case of potential echo, mainly when the downlink path is active. When the downlink path is inactive, the echo suppressor has unity gain. When the downlink path is active, the uplink path gain is set to a configurable value. The transition speeds for increasing and decreasing attenuation are adjustable.
SIMCom software provides a tuning parameter. Please refer to section 2.5 AT+ECHO part for detailed information and user guide.
1.3 Selective echo suppression
The uplink path includes a selective echo suppressor. Its operation can be compared to the basic echo suppressor, meaning that it is triggered since downlink speech activity is detected. Instead of applying a raw attenuation of uplink path as the echo suppressor does, the selective echo suppressor applied a filter. It is then possible to attenuate only some portion of spectrum. This capability is better than echo suppression because, during double talk, a portion of near-end speech is fully passing.
The selective echo suppressor is interesting to deal with non-linear/saturated acoustic device
(speakerphone mode typically). A non-linear acoustic device is going to create an echo composed by a linear transformation of downlink signal (linear echo) plus the non-linear transformation of downlink signal (non-linear echo). The echo canceller will handle correctly the linear portion of echo, so, out of echo canceller, it will remain only the non-linear echo.
One part of this non-linear echo is formed by the harmonic distortion of loudspeaker, harmonic 2 but most probably harmonic 3 of downlink signal. As the speech signal starts at 300Hz, the non-linear echo will appear above 600Hz (H2) but most probably above 900Hz (H3). In that situation, the selective echo suppressor could be set to filter above these frequencies while keeping the lowest ones untouched.
Another part of non-linear echo is formed when loudspeaker saturates. In general, speaker saturation adds on top of harmonic distortion a self resonating signal. This signal is tightly linked to speaker characteristic but on phone device types, it is generally a noise coming between 1.5kHz and 4kHz. This non-linear echo can be as well treated by the selective echo suppressor.
The selective echo suppressor can be tuned using 5 points describing the filtering curve. The first point is fixed at 0dB attenuation at 31.25Hz and it is not explicitly inside the parameter set. A filtering curve has at least 2 points. The last point must be at 3.97kHz. Any attenuation can be set for the points except for the first one. The filtering curve result is as below.
SIMCom software provides a tuning parameter. For detailed information and user guide about this parameter, please refer to section 2.5 AT+ECHO part.
SIM900 AUDIO Application Note
Fig.2 Selective echo suppression filter
2. Comparison between SIM900 and SIM300
2.1 AT+CHFA
This command is used to switch channels.
Main audio handset channel=0
Auxiliary audio headset channel=1
Main audio handfree channel=2
For detailed instruction about this command, please refer to<SIM900_AT_1.01.doc>.
2.2 AT+CMIC
This command is to adjust microphone volume of current channel. Adjustment range:0~15,0 is the minimum value,15 is the maximal value.
Default value for main audio handset channel is 7; default value for auxiliary audio headset channel is
9; default value for main audio handfree channel is 9.
Setting CMIC value is independent in each channel, which is adjusted separately, saved automatically, and taking effect immediately.
For detailed instruction about this command, please refer to<SIM900_AT_1.01.doc>.
2.3 AT+CLVL
This command is to adjust the receiver volume of current channel. Adjustment range is:0~100,0 is the minimum value,100 is the maximal value.
Default volume of 3-channel is 40, which needs to be set to corresponding channels to tuning volume.
Setting CLVL value is independent in each channel, which is adjusted separately, saved automatically,
SIM900 AUDIO Application Note
and taking effect immediately.
For detailed instruction about this command, please refer to<SIM900_AT_1.01.doc>.
2.4 AT+SIDET
This command is to adjust sidetone volume of current channel. Adjustment range is:0~16, 0 is the minimum value, 16 is the maximal value.
Default value of main audio handset channel is 1; default value for auxiliary audio headset channel is
5; default value for main audio handfree channel is 0.
Setting SIDET value is independent in each channel, which is adjusted separately, saved automatically, and taking effect immediately.
For detailed instruction about this command, please refer to<SIM900_AT_1.01.doc>.
2.5 AT+ECHO=X,X,X
This command is to adjust echo volume of current channel. First bit indicates audio channel, second bit indicates ES (0 ~ 8), third bit indicates SES (0 ~ 6),the greater the value, the stronger the effect of
ES and SES. ES and SES settings are independent to each other,and can be adjusted freely to each other.
Default values for each channel are: (0,0,0) (1,0,0) (2,7,4)
For detailed instruction about this command, please refer to<SIM900_AT_1.01.doc>.
Key points about tuning AT+ECHO parameters:
*ES and SES can reduce echo, but too larger value can cause intermittent voice.
*ES effect is better than SES in reducing echo, but it can cause voice more intermittently than SES.
*ES and SES parameters may lead to smaller uplink volume or failing the sending distortion when their values are too large.
*SIM900 echo algorithm has been optimized for memory effect, this may cause echo effect not able to be returned. Therefore, users are advised to restart the device after finishing setting ECHO command since this command can not take effect immediately.
For the above reasons, the following table shows the recommended values for echo parameter, please use it cautiously.
Echo
Algorithm
Audio channel
0 1 2
Characteristics
EC
For all the 3-channel, it can amend the linear part of the echo
SIM900 AUDIO Application Note
ES
Not recommended
Recommend
ES<=2
Recommend
ES<=7
Apply to simplex hands-free mode when speaker still has residual echo
Apply to hands-free mode when
SES
Not recommended
Recommend
SES<=5 non-linear or saturation problems caused by speaker.
Table 1 Echo algorithm usage recommendation
2.6 Audio parameters comparison between SIM900 and SIM300
CMIC
SIM900
SLR(dB)
SIM300 CLVL
SIM900
RLR(dB)
SIM300 SIDET2 SIM900(dB) SIM300
-13.41 9/16384
-13.38 10/20000 12.1 15.12
11/30000
12/32767
Table 2 SIM900 and SIM300 audio index comparison table
If user wants to completely mute or broaden the scope of the volume, please contact Shanghai SIMCom wireless solutions FAE for more information.
SIDET is measured under CMIC and CLVL is set to default values.
3. Detailed audio tuning process
The following is an audio tuning example of the hands-free channel.
Firstly user should set audio channel, use “AT+CHFA=2” to switch current channel to be hands-free
SIM900 AUDIO Application Note
channel. Then user needs to set CLVL and CMIC loudness to appropriate values (default value is OK generally, if necessary user can modify the value according to the method in second section). After adjusting to appropriate volume, user may test echo (Notice that the volume could not be too large, otherwise it would interfere echo effect and cause voice distortion).
If there is echo needed to be tuned, user needs to check the current ECHO (AT+ECHO?) firstly, feedback of ES and SES values are values 7 and 4 in the hands-free channel, then user needs to set
“AT+ECHO=0,7,5” and restart the device (too large ES and SES adjustment may cause voice intermittent, so user needs to use it moderately).
4. Key point for audio tuning of SIM900
4.1 Initial echo matter
SIM900 algorithm needs to go through a period of voice training learning sequence. There is a
5-second initial echo when a call is first set up or the audio channel is switched, after that the echo algorithm begins to take effect.
4.2 Sidetone self-adaptive matter
Changing CLVL value will cause SIDET changes. It is intended to hold the same sidetone under different volumes. If the sound is louder, sidetone will become louder when there is no adaptive function.
Therefore when CLVL is larger, SIDET is smaller; when CLVL is smaller, SIDET is larger. So user needs to first confirm the current volume when changing SIDET.
Specific changes are: assuming that the default value is CLVL=40, then sidet value is SIDET=3; if
CLVL is increased from 40 to 50, then SIDET will be changed from 3 to 1, if CLVL continues to increase,
SIDET will continuously to be changed until it reaches 0. If CLVL is reduced from 40 to 30, then SIDET will be changed from 3 to 5.
Summary: the sidetone adaptive rule is that when CLVL changes 10, SIDET will change 2, and so forth, until sidetone reaches its limit value. So if user needs to modify SIDET, they should first confirm the current volume. This adaptive law applies to all the three channels.
4.3 CLVL and RING/CLDTMF/STTONE/SIMTONE loudness matter
Changing CLVL parameter will change RING/CLDTMF/STTONE/SIMTONE loudness. For example, table 3 shows STTONE loudness changes with CLVL parameter. With CLVL increase and decrease, RING/CLDTMF/STTONE/SIMTONE loudness are increasing or decreasing corresponding.
SIM900 AUDIO Application Note
AT+CLVL CHFA=0 CHFA=2 CHFA=1
10 24.3 24.3 34.2
20 20.96 20.96 31.26
30 17.16 17.16 28.9
40 14 14 27.3
50 9.84 9.84 24.5
60 5.81 5.81 21.11
70 1.61 1.61 16.56
80 -2.54 -2.54 12.51
90 -2.54 -6.62 7.88
100 -2.54 -6.63 7.82
Table 3 STTONE loudness change with CLVL parameter table
Please refer to <SIM900_AT_1.01.doc>for more information about RING/CLDTMF/STTONE
/SIMTONE parameters.
SIM900 AUDIO Application Note
Contact us:
Shanghai SIMCom wireless solutions Ltd.
Address: Building A, SIM Technology Building, No. 633 Jinzhong Road, Shanghai,
P. R. China 200335
Tel: +86 21 3252 3300
Fax: +86 21 3252 3301
URL:
www.sim.com/wm
Scarica
Pubblicità