If you want to be positioned on the Western side of Madrid with good transport links, then reserve a cheap hotel near to the Principe Pio Railway Station in Madrid. Principe Pio is the name of the hill that the station is situated on, and is named after a Prince that owned property there. The hill has had several famous events take place there, and has some interesting buildings positioned on it including the Temple of Debod.
The railway station is a commuter line, and used to be called Estation del Norte and was an important train terminal. There is also a metro station and a bus station there so the transport links are second to none. So if you want to stay outside of the busy city in an area of interest with good transport links, then make sure that you book your budget hotel just outside of Madrid by the Principe Pio Railway Station.