> For the complete documentation index, see [llms.txt](https://help.imotions.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.imotions.com/lab/sensor-setup/shimmer/emg-study-design-baselining.md).

# EMG Study Design: Baselining

Remove the offset from an EMG signal by subtracting its mean or the average of a 3-second relaxed baseline stimulus recorded in your study.

EMG data needs to be baselined if there is a considerable offset in the signal (as in, the signal is not centered around zero). EMG data with an offset can be misleading, because it can trick you into thinking there is muscle activity present when there is not.

Consider the following example: ![2017-06-15\_1104.png](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-bcaa575056222b160a70db95c677e712cba374dd%2Fa860eabc54_2017-06-15_1104.webp?alt=media)

This EMG signal looks good, but you see that during what would be "quiet periods", the signal is offset (not listed at zero). Here are two ways to subtract this signal:

1. Take the mean of the entire signal, and subtract this from the raw EMG. Because EMG is a bipolar signal, the mean of an EMG signal should be zero. A non-zero mean is pretty representative of the offset of the signal, and you can just subtract this out. However, it's not ideal in cases where there is a lot of baseline drift or movement artifacts that might shift the mean of the signal. ![2.png](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-cd277cfb3991b19e2870eda5c96771bbf8ed686a%2F868f74833c_2-10-.webp?alt=media)
2. The better alternative is to set up a baseline EMG trial within your iMotions study. During this trial, you measure EMG during 3 seconds of quiet activity where you instruct the respondent to relax as much as possible. Any activity recorded during this baseline trial is averaged, and used as the offset value. This is as easy as setting up an instruction slide within the iMotions stimulus toolbar, with a textbox that says "Please relax" and an exposure time of 3 seconds.

   ![3.png](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-981f4b8975ce2836c1c0d4ddc988819791ec5595%2F948b23a5cf_3-6-.webp?alt=media)

Here is an example of 3 seconds of EMG recorded during this baseline trial:

![untitled.jpg](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-23cb2df156aad6d34465c78f0519374aeed35a7b%2Ff31783a65d_untitled-4-.webp?alt=media)

Calculate the average EMG during this baseline trial, and subtract it from your signal.

![2017-06-15\_1102.png](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-bd2faa7a99b0b7f0769f12b016e94228472caa67%2F6aa532f606_2017-06-15_1102.webp?alt=media)

Your baselined EMG signal should now be aligned at zero.

![3.jpg](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-c8c3bedea1d981cb86167ee459cacebd82f5b04e%2F165c4a69c4_3.webp?alt=media)

Baselining can be done before or after filtering.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.imotions.com/lab/sensor-setup/shimmer/emg-study-design-baselining.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
